|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1529 |
Print/input |
18/04/2007 @ 01:47 by Andrew
|
I have a simple file writing routine, basically like this:
OPEN "filename" FOR OUTPUT AS #1 PRINT #1, %varA$ PRINT #1, %varB$ PRINT #1, %var1% PRINT #1, %var2% ...so on... CLOSE #1
Then...
OPEN "filename" FOR INPUT AS #1 INPUT #1, %varA$ INPUT #1, %varB$ INPUT #1, %var1% INPUT #1, %var2% ...so on.. CLOSE #1
The numeric variables are read back just fine, but instead of getting string variables, I'm getting back very large numbers, ie, 2.04 E 5248663.
I'm writing and reading sequently, in exactly the same order, So I'm not trying to read a numeric value into a string variable.
Plus, since I added the file save/read my code's been locking up.
HELP!!
Andrew aka Supertrucker
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 18/04/2007 @ 19:11 by JoeV
visitor |
Hello Andrew,
I have written the following program and it runs fine on my palm. Have you looked at the "filename" contents with Bird or a resource editor?
Regards, JoeV
dim %varA$,%varB$ dim %var1%,%var2%
BEGIN
%varA$="first line" %varB$="second line" %var1%=pi %var2%=2*pi
OPEN "junk" FOR OUTPUT AS #1 PRINT #1, %varA$ PRINT #1, %varB$ PRINT #1, %var1% PRINT #1, %var2% CLOSE #1
OPEN "junk" FOR INPUT AS #1 INPUT #1, A$ INPUT #1, B$ INPUT #1, a INPUT #1, b CLOSE #1
print A$ print B$ print a print b
repeat : a=doevents : until a=-1
END |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 19/04/2007 @ 00:13 by Andrew
visitor |
Thank you JoeV, I figured it out. I was just being an idiot, and forgot to have my file write code updated on exit of the program, works fine now!
Thanks again!
Andrew aka Supertrucker |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|