Re: Get Statement Not Retrieving Record Correctly

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Sep 21, 10:48 am, dpb <n...@xxxxxxx> wrote:
Ben wrote:
Thanks for ready this post. I am using a Get statement to read an
ascii file. In the data is a value of "1/2" then it appears that the
Get statement ignores the value after the "/". An example of what the
data is and then how Get statement retrieves it...

Data as in the File: "46 1/2 ISLAND"

Get Statement: "46 1/ ISLAND"

Does anyone know a work around to get the full value "1/2"?

Below is the code to open the file.

FF = FreeFile
Open strFileName For Binary As #FF

Do Until EOF(FF) And lbCancel = False
Get #FF, Posn, Rec

Should need no "workaround". There's a problem either in the code not
shown or the contents of the data file or perhaps even in the display of
the result.

As well as the other questions from Jeff and Rick, what does Debug show
the actual contents of the record in question on file contain? That is,
how do you know the data is what you say and _only_ what you say? Given
the symptom that the remainder of the record is read past the apparently
missing "2" and the record seems to display as a character longer than
the data record, I'm guessing the most likely culprit is a multi-byte
non-printing character in the file that may have come from a word
processor or other source wherein the "1/2" was displayed as the single
symbol and converted on save to the written fraction but not correctly
or some similar scenario.

In short, I'll bet the contents of the data file are not the following
hex bytes

34 36 20 31 2F 20 49 ...

but

34 36 20 31 2F xx xx 20 49 ...

--- Hide quoted text -

- Show quoted text -

Viewing the data file in a Hex editor for the values in question "1/2"
the hex value is "31 2f 32"

.



Relevant Pages

  • Re: Get Statement Not Retrieving Record Correctly
    ... missing "2" and the record seems to display as a character longer than ... the hex value is "31 2f 32" ... If it isn't in the data on disk, it's in something not yet shown or, I suppose there could be some bizarre problem in the VB runtime i/o library, but that would be farfetched that the above symptom would be all that it triggered and everything else is still functional. ...
    (microsoft.public.vb.general.discussion)
  • Re: Get Statement Not Retrieving Record Correctly
    ... the symptom that the remainder of the record is read past the apparently ... missing "2" and the record seems to display as a character longer than ... the hex value is "31 2f 32" ...
    (microsoft.public.vb.general.discussion)
  • Re: Hex Display Subcircuit
    ... LED display that I'm using is high efficiency -- it runs 16mcd@10mA -- so ... using a 16-key keypad. ... (This circuit started out using a 16F872, ... Unfortunately, I need a *hex* display, and none of these ...
    (sci.electronics.design)
  • Re: cant get ce to run with a flat panel display.
    ... Currently I have the display outputting to the VGA but I ... I see the following registry settings relating to the LCD. ... Hex - 0 ... be one that enables CRT, LCD or both LCD and CRT. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: lab help
    ... display '. ... it is best to use XOR instead of mov. ... BCD numbers are already coded in hex. ...
    (comp.lang.asm.x86)