Here is a little code, that is kind of fun, I enjoyed it,...it compiles fine useing qb64, but is pretty much just qbasic, still,...
A new command is used. SOUND instead of play,...
SOUND click for more details. Eventualy, we will be going into more ways, to do sounds, Play being the most simple, there is also a way to load a midi or wav file, and another command
_snddraw ,..but we will go into them later.
PRINT "Code taken from Ted Weisenburgers, q-basics Chapt 2,part 3"
PRINT "Count = "; amount%; "bags"
CLS
For row% = 2 to 27
Locate row%,28
COLOR 13: PRINT "the sky is falling!"
SOUND (2000/ row%),1 '//creates a slight delay and plays a sound
Locate row% - 1,28
PRINT SPACE$(19)'//The PRINT SPACE$(19) erases the previous line when a new line is printed.
NEXT row%
If you have any trouble with this code, let me know, it works fine, on qb64 and my computer, BUT, be careful, that you type it correctly, or if you copy and paste it,...make sure you get it all, these are the most common causes of errors for me, typos, or if I copy and paste something, some times I have missed a line, and it dose not work,... Also I forgot, and if you are just starting, you may not know this, uasully you can select all the code, then "copy", then paste into note pad, or directly into the qb64 editor/ide, if you have it runing,...if you use note pad, be sure, to save it as a .bas, so you can then open it with qb64,...You can also save it as a txt file, and when you copy and paste it into the qb64 editor,...if you save it , it saves as a .bas automatically,... Guess thats about it,
from Garry