teletubby5e
Technical User
hello all,
i am trying to read 2 column text file with numeric string values called say, num1, and num2. i get the strings read correctly, but then get a token error when i try to use the string num1 later in the script ...
SDLGFOPEN "FILE CONTAINING 2 COL's OF NUM's SEPARATED BY COMMAS" "C\*.*" SINGLE TEST
FOPEN 1 TEST READ TEXT
WHILE NOT FEOF 1
FGETS 1 LINE1 ; GETS A LINE OF DATA AND READS IT INTO STRING LINE1
STRTOK NUM1 LINE1 "," 1 ;RDS LINE PUT ALL DATA UP TO THE COMMA IN STRING NUM1
STRTOK OELEN LINE1 "," 1 ;PUTS REST OF LINE INTO VAR NAMED OELEN
STRFMT NUMFUNC "DO THIS COMMAND,DN=%s;" NUM1
TRANSMIT NUMFUNC
and this is where it gioves me the following error:
Error C020 Line 36: Invalid token: NUM1
is there a convert token back to string function?
thanks, jeff
i am trying to read 2 column text file with numeric string values called say, num1, and num2. i get the strings read correctly, but then get a token error when i try to use the string num1 later in the script ...
SDLGFOPEN "FILE CONTAINING 2 COL's OF NUM's SEPARATED BY COMMAS" "C\*.*" SINGLE TEST
FOPEN 1 TEST READ TEXT
WHILE NOT FEOF 1
FGETS 1 LINE1 ; GETS A LINE OF DATA AND READS IT INTO STRING LINE1
STRTOK NUM1 LINE1 "," 1 ;RDS LINE PUT ALL DATA UP TO THE COMMA IN STRING NUM1
STRTOK OELEN LINE1 "," 1 ;PUTS REST OF LINE INTO VAR NAMED OELEN
STRFMT NUMFUNC "DO THIS COMMAND,DN=%s;" NUM1
TRANSMIT NUMFUNC
and this is where it gioves me the following error:
Error C020 Line 36: Invalid token: NUM1
is there a convert token back to string function?
thanks, jeff