Main sections
GETTIMERALL()
dtime# = GETTIMERALL()
Returns the elapsed time since the program's start in 1/1000 sec.
// --------------------------------- //
// Project: GETTIMERALL - Demo
// IDE Version: 1.40304
LIMITFPS -1
WHILE TRUE
TextScroller("Hello World")
SHOWSCREEN
WEND
// ------------------------------------------------------------- //
// -=# TEXTSCROLLER #=-
// ------------------------------------------------------------- //
FUNCTION TextScroller: text$
// Diese Variablen sind als LOCAL definiert:
// These variables are defined as LOCAL:
// text$
LOCAL fx, fy, xoffset, screenx
screenx = 640 // Screen width / Bildschirmbreite
GETFONTSIZE fx, fy
xoffset = -GETTIMERALL()/10 // X-position of text / X-Stelle des Textes
// Modulo the offset, so that text comes from the right after it completely
// disappears left.
// Modulo operation auf Offset anwenden, so dass der text von rechts
// kommt, nachdem er komplett links verschwunden ist.
xoffset= MOD(xoffset, screenx + LEN(text$)*fx) + screenx
PRINT text$, xoffset, 100 - ABS(COS(GETTIMERALL()/5)) * 100
ENDFUNCTION