Qbasicnews.com
December 08, 2019, 05:44:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 3 [4]
  Print  
Author Topic: Shortest useful program  (Read 13097 times)
Dav
Administrator
Ancient Guru
*****
Posts: 709



WWW
« Reply #45 on: October 16, 2003, 08:11:29 PM »

Here's a 3 line screen saver, lines moving up & up:

Code:
1 SCREEN 13
2 IF INT(RND * 2) = 1 THEN LINE (RND * 320, RND * 190)-(RND * 320, RND * 190), RND * 256 ELSE PRINT
3 IF INKEY$ <> "" THEN END ELSE GOTO 2



- Dav
Logged

Dav
Administrator
Ancient Guru
*****
Posts: 709



WWW
« Reply #46 on: October 21, 2003, 09:51:49 PM »

o well, my last 3 line screen saver -- same method for animation as the one above.  hrmm, hard to come up with anything in just 3 lines.   :-?

Bubbles floating up in SCREEN 12...

Code:
1 SCREEN 12
2 IF INT(RND * 2) = 0 THEN CIRCLE (640 * RND, 440 * RND), RND * 30, 7 + RND * 1 ELSE PRINT
3 IF INKEY$ <> "" THEN END ELSE GOTO 2


- Dav
Logged

seph
Na_th_an
*****
Posts: 1915



« Reply #47 on: October 21, 2003, 11:22:11 PM »

Why has there not been a
Code:
CLS

yet?
Logged

earn.
oracle
*/-\*
*****
Posts: 3652



WWW
« Reply #48 on: October 22, 2003, 02:42:10 AM »

Because the thread was entitled shortest useful program (3 lines), so CLS doesn't count Smiley

Dav, your last line could be:

Code:
IF INKEY$ = "" THEN 2


lazy style, but hey Smiley
Logged

Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!