Archived

This topic is now archived and is closed to further replies.

philscott

Suggestions for program...

Recommended Posts

I''ve got a really cool program written in BASIC and I would like some suggestions on how to improve the code. 10 PRINT "PHIL IS SKILL" 20 GOTO 10

Share this post


Link to post
Share on other sites
Welll... hardcoding the string is probably a bad idea, you should make it a constant variable (or whatever is equivalent in BASIC). Also, PRINT is usually pretty inefficient, I would suggest reimplementing it in inline assembly (or as a separate C dll if your BASIC system won''t allow that).

Share this post


Link to post
Share on other sites
well, you know GOTO is evil (), so:
10 REPEAT
20 PRINT "hello world"
30 UNTIL FALSE
John B

[edited by - JohnBSmall on November 9, 2002 12:21:58 PM]

Share this post


Link to post
Share on other sites
10 rem My Program's Better because I'm Smart
20 gosub 40
30 end
40 print "I wonder how long this will Run??"
50 goto 20

[edit]
oops
[/edit]

[edited by - CodeJunkie on November 9, 2002 12:37:46 PM]

Share this post


Link to post
Share on other sites