HP Prime for All

English  Русский 

Syntax

WAIT(n)

Description

Halts program execution for the specified number of seconds. If n is omitted or 0, halts execution until the user presses a key and returns the keycode (or -1 after 1 minute). If n is -1, halts executions until the user presses a key or there is a mouse event. If a key is pressed, the keycode is returned. After a 1 minute timeout, returns -1 If a mouse event happends, a list of the form { type, [x, y], [dx, dy] } is returned. Normally x/y is the event position unless otherwise indicated. Type can be: 0: Mouse Down 1: Mouse Move 2: Mouse Up (x/y is not provided) 3: Mouse Click (note, if a click is detected, there is no MouseUp) 5: Mouse Stretch. x/y is the delta since the last event. dx/dy is the delta since the ORIGINAL mouse down... 6: Mouse Rotate, x is original angle, y is new angle in 32nd of a circle. 7: Mouse Long Click, This means that the mouse stayed down for 1 second...

Example

WAIT(5) halts program execution for 5 seconds.

WAIT — Discussion