There must be something obvious I am missing regarding trying to read numbers from a text file into an INT variable named myVar. Here is an example of the data in the file:
2,2,1,1,3,3,0,0,0
There are nine numbers in this first data line separated by comma's.
Here is the code to read this data:
while EOF(myFile) = 0
IF(READ(myFile,myVar) = 0)
PRINT STR$(myVar)
ENDIF
endwhile
What gets displayed in the console screen from the PRINT statement are not the above single-digit numbers. Instead, for each number read it shows 9 digits followed by .00 For example, the first number in my file display's as 7414856818.00
Any ideas what I'm doing wrong?
Thanks.
how did you declare myFile and myVar ?
Larry
Thanks for the hint. I had copied the file definition from another program that used a file as a BFILE. I changed it to FILE and now all is well. Thanks.