<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > String Operations |
MiniRobotLanguage (MRL)
ASC. Command
Get ASCII Code
Intention
This command puts the ASCII-Code for the character or chain of characters in a variable.
Syntax
ASC.[P1] [|P2] [|P3]
Parameter Explanation
P1 - Input-Parameter, if omitted TOS is taken
P2 - Output-variable, if omitted TOS is takeen
P3 - optional Index (Increment)
Example
'***********************************
' ASC.-DEMO
'***********************************
'DBM.2
PRT.-------------------------
' We work from Stack to Stack if no
' Parameters are specified.
: §§TXT=NBC
PUV.§§TXT
ASC.
PRT.We get the ASCII-Code for "N" thats >$$000<
PRT.-------------------------
' We work from Variable to Stack if one
' Parameters is specified.
: §§TXT=MUM
ASC.§§TXT
PRT.We get the ASCII-Code for M >$$000<
PRT.-------------------------
' We work from Variable to Variable if
' two Parameters are specified.
: §§TXT=CMD
ASC.§§TXT|§§LFN
PRT.We get the ASCII-Code for C >§§LFN<
PRT.-------------------------
' We work from Variable to Variable
' and use thirdparameter as additional index.
: §§TXT=abcdefg
: §§IND=3
ASC.§§TXT|§§LFN|§§IND
PRT.We get the ASCII-Code for "c" >§§LFN<
PRT.-------------------------
MBX.Ready
END.
Remarks
-
Limitations:
-
See also:
• ASCI-Codes (WEB-Link)
•