Does SmartBASIC have a pause or wait feature?

Answer

smartBASIC does have a wait function however it does not function like wait functions in other languages that many are programmers are accustomed to. Please refer to page 124 of the smartBASIC core users guide at the GetTickCount and GetTickSince functions. You will need to utilize these functions to create a pause in your script. Please note that the pause is really a lock as these functions lock the script for the duration of pause you input. ----Sample Script Showing Use---- // // Definitions // #define #define BzrGpio 15 #define DigiOut 2 #define Timer_0 0 #define TimeLeng 5000 #define Recur 0 //1 for recur, 0 for Non Recur // Global Variable Declarations dim rc // "rc" = result code dim ms // value for delay timer // Functions & Subroutines sub OnStart() rc = GpioSetFunc(BzrGpio, DigiOut, 3) print "

Program Started" TimerStart(Timer_0, TimeLeng, Recur) endsub sub Delay(ms) dim tn : tn = GetTickCount() while (GetTickSince(tn)