Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compiling tip - which you probably allready know ;)
#1
Here's something I came across whilst recently compiling some of my games.
This post is based on a topic earlier about using the '?' shortcut to save on typing PRINT.
I honestly didn't think anyone into programming didn't know this - so maybe there are some who don't know anout this little quirk (i guess it's just what you get brought up with).

If you write programs with line nos they will compile fine - unless you make the sin of using line zero (0) !
Qbasic works fine until it trys to compile. Then an error occurs.

Just thought i'd point it out - cos it was news to me !!! Smile

P.S. ANyone interested in them :
http://bucky.akropolys.com/
Reply
#2
One reason for that restricted line number (other than the fact people aren't generally taught to start counting from 0) is it allows the statement

ON ERROR GOTO 0

to turn off error-trapping instead of turn error-trapping on with the error trap being at line 0.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
Nice to know. I would have never found out 'cause when I coded in GW-BASIC you simply couldn't enter line number 0 and when converting to QB my code didn't have it.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#4
I know this since I tried to program my tic-tac-toe
and couldn't understand why RETURN 0 wouldn't
work... I hat bugs!
/post]
Reply
#5
.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)