DELAY statement

Purpose: DELAY creates a timed delay, pause or wait. DELAY will provide a time resolution of 1 second.


Syntax:

 DELAY NumSeconds AS INTEGER

Parameters:

  • Data type: INTEGER
    NumSeconds Number of seconds to delay.

Example:


 DELAY 3 ' delay 3 seconds

SLEEP statement

Purpose: SLEEP creates a timed pause with a time resolution of 1 millisecond, which is significantly finer than the 1 second resolution of the DELAY statement. The SLEEP procedure is a simple wrapper for the Win32 API Sleep statement.


Syntax:

 SLEEP(Milliseconds AS INTEGER)

Parameters:

  • Data type: INTEGER
    Milliseconds Number of milliseconds to pause. Parentheses are optional.

Example:


 SLEEP(1234) ' delay 1,234 milliseconds

PAUSE statement

Purpose: PAUSE stops the running program and waits for a key to be pressed before allowing the program to continue. PAUSE is intended for use in CONSOLE mode programming.


Syntax:

 PAUSE

Parameters:

  • None Output is "Press any key to continue . . ."