-->
Page 1 of 2

Unexpected math/print results

PostPosted: Wed Nov 25, 2015 3:12 pm
by timathis
I believe that I have latest version.
Why does this program produce the below output?
What happened to the numeric values?
y=100
print x
print y
print y*2
print 2*y
print y-60

x
y
y*2
2*y
y-60
Done...

Re: Unexpected math/print results

PostPosted: Wed Nov 25, 2015 4:55 pm
by Rotohammer
the print command doesn't do evaluations, try:
Code: Select alllet y = 100
print x
print y
y = y * 2
print y
y = 2 * y
print y
y = y - 60
print y


Results:
Code: Select allx                                                                               
100                                                                             
200.00                                                                         
400.00                                                                         
340.00

Re: Unexpected math/print results

PostPosted: Wed Nov 25, 2015 6:40 pm
by timathis
Thanks for reply. I had not considered that possiblility.

Considering the print x line----

Print x would usually print a zero if x is not assigned in most basics wouldn't it.

Is it normal for the basic to print the x as a character even with no quote marks?

timathis

I

Re: Unexpected math/print results

PostPosted: Wed Nov 25, 2015 6:45 pm
by Mmiscool
See this thread for quotation mark stuff.

It is a known problem.


viewtopic.php?f=42&t=6386