Skip to content

Instantly share code, notes, and snippets.

@Tricky1975
Created October 31, 2018 11:17
Show Gist options
  • Save Tricky1975/7838bf58bd95513a5f4db2231122894c to your computer and use it in GitHub Desktop.
Save Tricky1975/7838bf58bd95513a5f4db2231122894c to your computer and use it in GitHub Desktop.
Nice cascade effect in GW-BASIC! I still got it in me after 30 years.... :P
10 A=35
15 B=-1
20 FOR I=1 TO A
30 PRINT"X";
40 NEXT
50 FOR I=1 TO 75-(A*2)
60 PRINT" ";
70 NEXT
80 FOR I=1 TO A
90 PRINT"X";
95 NEXT
99 PRINT
100 A = A + B
105 IF A<=1 THEN B=1
110 IF A>=35 THEN B=-1
120 GOTO 20
1000 ' Creates an infinite loop causing a nice effect
1010 ' Coded by Jeroen P. Broks in 2018
1020 ' No copyrights, or any shit like this.
1030 ' This was just a quick way to remember my first days as a coder
1040 ' When I began in BASIC, before moving to Pascal and other languages.
@Tricky1975
Copy link
Author

This program was tested in PC-BASIC... a nice Python program emulating good old GW-BASIC.
It should basically work on all BASIC interpreters that were around in the 1980s without any conversions, however, some interpreters may require you to put a space between PRINT and the " on lines 30, 60 and 90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment