Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STRTOK value. function to cnvt back to string?

Status
Not open for further replies.

teletubby5e

Technical User
Oct 31, 2002
147
US
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
 
It seems that you might have miss typed the NUM1 variable between the two or you might mot have declared the variable. If you could post the actual script then I can look at it.

To go where no programmer has gone before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top