How to go into an infinite loop if it's not BASIC 7.0 :P

Started by Edwing, January 24, 2007, 10:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Edwing

Okay... I guess that kind of violates the thing I just wrote about tips being supposed to be useful ... :rolleyes: But just once I hope it's okay...

Anyway it may be interesting to know that while all other BASICs go into a loop you can only leave with an NMI (i.e. editor reset via STOP/RESTORE) when encountering a CONT inside a program, BASIC 7.0 (and probably 10.0 on the C65) will just continue (which kind of makes sense, since that is what we tell the computer to do :P ... just like entering STOP in direct mode, which correctly will make BASIC display BREAK :lol: ).

So you could write something like:
10 PRINT"THIS PROGRAM IS FOR C128 ONLY!":CONT
20 PRINT"{CRSR UP}"CHR$(27)"@FEELS GOOD HERE!":PRINT"{CRSR DOWN}HOW ABOUT YOU?"

Maybe that even IS useful because if you think about it, if you detect the BASIC you're running on to prevent your program from running on the "wrong" machine, the idea often is that if it's Basic 2.0, the program should not proceed further (well, if it's a BASIC 7.0 program, anyway).

Ciao,
George :)

hydrophilic

Stupid trick that works in BASIC 7.  Put it at the beginning to bug out older versions.

10 BEND OVER

Blacklord

Quote from: hydrophilicStupid trick that works in BASIC 7.  Put it at the beginning to bug out older versions.

10 BEND OVER
Just wondering if that should go in the Humour forum ? :D