[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [N8VEM-S100:6691] CP/M Mbasic 5.21

Hi Todd --

>> E=1
>> Ok
>> PRINT 4 * E
>> -2.41704E-35
>> Ok
>> Z=10
>> Ok
>> PRINT 4 * Z
>> -2.41704E-34
>> Ok

>> In my mind 4 * E should equal one
>> and 7 * Z should equal ten.

>> Why am I getting -2.xxxxEyy ?????
I suspect -2.41704E-35 is a "junk" value -- i.e. you are printing out an uninitialized variable.  In most BASIC's, there is *NO* retention from line to line when you enter them as single line commands.  So, entering E=1 on one line, and then entering PRINT 4 * E on another line, will only get you an uninitialized variable.  BASIC doesn't remember the E=1 part at that point.  To do what you want, you'll have to figure out what the continuation character is (maybe ";" ???) for your particular flavor of BASIC, and then enter E=l ; PRINT 4*E all on one line.  You get the idea.  OR, you could do what was already suggested, and enter it in all in a program, and then "RUN" the program.

Hope this helps.