Variable Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > SCS. - Select from Mutiple Cases >

Variable Commands

VIF. - Variables IIF

Previous Top Next


MiniRobotLanguage (MRL)

 

VIF. - String IIF

Return one of several Strings depending on an number

 

 

Intention

 

Conditional Statement for selecting one of multiple elements based on a given index.

This Command looks at the "Type of Variable" that is returned and try's to keep the Var type in the result.

The command will only check the Vartype of the element that is to be returned.

 

 

 

Syntax

 

 

VIF.P1|P2|P3|P4[|P5...P27]

 

 

Parameter Explanation

 

P1 - Index number to select which string element to return.

P2 - Variable to store the returned string element.

P3 - First variable of any type.

P4 - Second variable of any type.

P5 to P27 - (optional) Additional elements.

 

 

 

 

Example

 

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

' IRS.-Sample

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

VAN.$$IDX=2

VAI.$$VAR1=3.54

VAP.$$VAR2=23,56

VIF.$$IDX|$$RES|$$VAR1|$$VAR2

DBP.$$RES

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: