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

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



Roger

You must be close,

I'm trying to convert this NorthStar basic line;

640 FOR Q=1 TO D9\E=FNM(D3-1)+1\!A$(4*E-3,4*E),\!D1,\IFZ<1 THEN 680


To CP/M basic as;

640 FOR Q=1 TO D9
642 E=FNM(D3-1)+1
644 PRINT A$(4*E-3,4*E),
646 PRINT D1,
648 IF Z<1 THEN 680

Reason for my conversion ? 

I couldn't find a continuation character in MBasic.

When I run the program with my changes I still get
the wrong answer as if Basic isn't remembering "E" 
from line to line.


Todd




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. 

Roger