Return to Statement


ASCII Value of a Character Example

This example demonstrates the use of the ASCII function. It returns the text of a label, evaluates it using an IF statement, and deletes the label if the second character is alphabetically greater than the letter "G". If the label is less than "G", it is not deleted.

   ENTITY/ENT
STRING/STR(6)
L10:IDENT/'PICK LABEL',ENT,RESP
JUMP/L10:,TERM:,,,,RESP
STR=&DMTEXT(ENT)
NUM=ASCII(STR,2)
IF/NUM>71,DELETE/ENT
JUMP/L10:
TERM:
HALT