Skip to content

Instantly share code, notes, and snippets.

@schmudde
Last active January 24, 2016 12:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmudde/28064a45222290653517 to your computer and use it in GitHub Desktop.
Save schmudde/28064a45222290653517 to your computer and use it in GitHub Desktop.
A code snipped from a BASIC database program I wrote circa 1994.
DECLARE SUB game ()
SCREEN 9
RANDOMIZE TIMER
COLOR 4, 0
CLS
WIDTH 80
INPUT "what is your choice"; choice
IF choice = 1 THEN game
SUB game
INPUT "Would you like to (A)dd a game or (L)ook at the list"; list$
IF list$ = "A" THEN GOTO 10
IF list$ = "L" THEN GOTO 11
OPEN "Games.dat" FOR APPEND AS #1
10 INPUT "What is the name of the game"; Name$
INPUT "What system is it for"; system$
INPUT "How much did it cost"; cost
PRINT Name$, system$, cost
INPUT "Is this all correct (Y/N)"; correct$
IF correct$ = "Y" THEN GOTO 12 ELSE GOTO 10
12 CLOSE #1
PRINT "Thank You"
END SUB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment