wcBASIC Code Snippet of the Day: "Animated Text"
DISCLAIMER: I know this can be applied to regular BASIC as well, and it
has no special features that are Wildcat! specific, but I am going to
share this wcBASIC code anyway for those that are new to wcBASIC and
don't have an ounce of BASIC programming knowledge. so please don't bust
my chops about this.
Someone new to wcBASIC was having an issue with trying to get lines of
text to move down one line at a time on the screen (sorta "animated")
So, in my usual kind way, I decided to give him a small piece of working sample code to help him get started and thought I would share it with
the Wildcat! community at large:
dim idx as integer
dim txt as string = "This is a demonstration."
dim blk as string = " "
dim dly as integer = 1
dim y as integer
dim x as integer = 15
cls
for y = 1 to 15
locate y, x
print txt
delay dly
locate y, x
print blk
delay dly
next y
print
waitenter
Enjoy!!!!
... Air pollution is a mist demeanor.
--- Wildcat! v6.4.454.2 (Nov 17 2011), Editor Mod v1.7
* Origin: Wildcat! Wiki -
http://wiki.winserver.us (1:116/18)