Mathematical and algorithmic operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Miscellaneous commands >

Mathematical and algorithmic operations

ITO. / NTO. - If TimeOut

Previous Top Next


MiniRobotLanguage (MRL)

 

ITO. Conditional Statement

If TimeOut-Flag set

 

 

Intention

 

Conditional Statement.

 

Test if the Timeout-Flag #tio# has been set by the previous command.

 

A command may set the timeout flag under error conditions, or when it runs into a TimeOut. Here is an example:

 

' The following STW. will run into an TimeOut

STW.Xwt|0|no-such-window

ITO.

 DBP.The last command ran into an timeout!

EIF.

ENR.

 

If you run the script, this is what you see in the Debug-window of the editor.

 

graphic

 

Many other commands also set the TimeOut-Flag in case of error-conditions. As well, mos commands clear the TimeOut-Flag if there are no error-conditions, and no timeout. Therefore always check the TimeOut-Flag immediately after the command that you want to test for success.

 

You can call ITO. with a parameter. In this case the value will overwrite the TimeOut-Flag and  force  (1) true or (0) false evaluation.

A value of  2 or if the variable is empty will make ITO. to do its normal job and check the TimeOut-Flag..

 

ITO. will always leave the TimeOut-Flag cleared after it has been called.

 

There are two Systemvariables, representing the state of the timeout-flag:

 

#tio#   -       Timeout-Flag

#til#   -       Timeout-Line-Number

 

NTO. is the negative Form of ITO.

 

 

Syntax

 

ITO.[P1]

 

 

Parameter Explanation

 

P1 - (optional) variable that evaluates to "1" or "0". In this case the value will overwrite the TimeOut-Flag and  force  (1) true or (0) false evaluation.

A value of  2 or if the variable is empty will make ITO. to do its normal job and check the TimeOut-Flag.

 

 

 

Example

 

'***********************************

' ITO.-Sample

'***********************************

' The following STW. will run into an TimeOut

STW.Xwt|0|no-such-window

ITO.

 DBP.The last command ran into an timeout!

EIF.

ENR.

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

 

 

See also:

 

    1.6.1. Program Flow Control

    JIT. - Jump if TimeOut

    JNT. - Fump If-No TimeOut

    STF. - Set TimeOut Flag