mod() -- compute the remainder of a division
The mod-function divides its two arguments and computes the remainder. Note, that a/b-int(a/b) and mod(a,b) are always equal.
//*** requires ncurses support compiled in ***
//See Documentation/Advanced for info.
print at(10,10) "Please wait "
for a=1 to 100
rem ... do something lengthy here, or simply sleep :-)
print at(22,10) mid$(p$,1+mod(a,4))
This example executes some time consuming action within a loop (in fact, it simply sleeps) and gives the user some indication of progress by displaying a turning bar (thats where the mod()-function comes into play).
Start this program in a terminal.