Loading ...
Sorry, an error occurred while loading the content.

Re: alphanumeric items in files

Expand Messages
  • rhnlogic
    The field$() function can be used to parse out substrings. All string input in Chipmunk Basic is line input.
    Message 1 of 2 , Dec 2, 2011
    • 0 Attachment
      The field$() function can be used to parse out substrings.
      All string input in Chipmunk Basic is line input.

      --- In chipmunkbasicforum@yahoogroups.com, "john_doe_6678" <google@...> wrote:
      >
      > Hi everybody.
      > I just signed in the group. The last time I wrote code, it was some AppleSoft Basic, in the 80's. So my question maybe "for dummies" level !
      >
      > I want to read from a text file. If the data are numbers, it is working.
      >
      > 100 open "file.st" for input as #1
      > 200 input #1,a,b,c
      >
      > The three first numbers from the file are stored respectively in a, b and c.
      >
      >
      > Now, if the data are alphanumeric chains, things are different.
      >
      > 100 open "aaa.st" for input as #1
      > 200 input #1,a$,b$,c$
      >
      > In this case the whole first line of the file is stored in a$, the whole second line in b$, etc.
      > I tryed to use comma separator instead of tabulation but it did not solve anything.
      >
      > How can I read alphanumeric chains one by one, the same way I read numbers ?
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.