aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1529

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1529  Print/input

18/04/2007 @ 01:47
by Andrew

Anonymous



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

Write to Andrew   Post an answer  Top

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

Anonymous

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
  Post an answer  Top

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

Anonymous

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
Write to Andrew   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^