Last active
February 29, 2020 11:25
-
-
Save thunderpoot/e37659886f4a2f7556af9e0930257827 to your computer and use it in GitHub Desktop.
Loading bar in TeleBASIC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "Loading..." : PRINT : S% = 1 : E% = 60 : FOR T% = S% TO E% | |
20 SLEEP 0.1 : REM YOUR PROGRAM LOGIC HERE, ADJUST S% AND E% VALUES | |
30 MD = INT((T%/E%*100)/10) : ML = 10 - INT((T%/E%*100)/10) : P% = INT(T%/E%*100) | |
40 IF O% <> P% THEN GOTO 50 : ELSE IF P% <> 100 THEN NEXT T% | |
50 PRINT CHR$(27) "[A" "[" STRING$(MD, "#") STRING$(ML, " ") "] " STR$(P%) "%" : O% = P% : NEXT T% | |
60 PRINT CHR$(27) "[A" CHR$(27) "[18C" "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment