-
Notifications
You must be signed in to change notification settings - Fork 5
Description
In Applesoft you can drop the leading zero or add zeros to a decimal number and it will store this as typed. It does not affect the value or operations on that variable by math functions. The output will be the same but the source listing is modified by bastools.
Why would anyone care? Typing in Applesoft programs from a magazine such as Nibble and verifying with a checksum tool such as KeyPerfect will give incorrect values. If possible, it would be nice if what you type is what you get in the conversion tool. I already hit this on the second program I tried because there is no fixed rule for entering numbers in Applesoft.
Example:
APPLESOFT (VALID CODE, SHOWN USING LIST)
10 PRINT "MATHING"
30 A = .4
40 B = 0.6000
50 C = -.250
60 D = -0.70
70 PRINT "A=";A
80 PRINT "B=";B
90 PRINT "C=";C
95 PRINT "D=";D
TOKENIZER
10 PRINT "MATHING"
30 A = 0.4
40 B = 0.6
50 C = - 0.25
60 D = - 0.7
70 PRINT "A=";A
80 PRINT "B=";B
90 PRINT "C=";C
95 PRINT "D=";D
SAME OUTPUT:
A=.4
B=.6
C=-.25
D=-.7