Home Forums HTBasic Forum Reading data from a WS_FILE

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1705
    satttom
    Participant

      Hi,

      we have a program in HT basic thats saves measurement values into a HFSLIF WS_FILE and displyas them.
      When i open this file (i need to write the data to SQL) i get some strange results.
      If the data was written like this: variable$(1)=data$ i can read it using notepad.
      But if it was written like this: variable$(1)=VAL$(data) i get strange records in the file.
      Here is what i mean:
      @( ?üĚĚĚĚĚÍ @” @( @$ @uŕ @2 @< @˝L @T @1 @1 @Ź@ @‚Ŕ @? @Ź@ @333333@333333 @( @H @’Ŕ @·p @333333 ˙
      The first number (“@(“) should be 12, the second one (“?üĚĚĚĚĚÍ”) should be 1,8, the third one is empty.

      My question is how do i get “integers” from this “strings”? What is the encoding for this data?

      Thank you, have a nice day,
      ST

      #4433
      Anonymous

        As for the format I am not sure as I haven’t looked into it. Try to use FORMAT ON in your ASSIGN statement in order to use ASCII encoding.

        If you have a bunch of old data stored in that format you could write a script to read it all in with format off then save it back out with format on to be readable text.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      Scroll to Top
      HTB icon

      Please Sign In