10 asc% function, 11 len% function, 12 str$ function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 92
7Ć4
The function returns a string character, corresponding to the
decimal ASCII value of the input expression:
STRINGS$ = CHR$(41H)
(STRING$ is loaded with `A')
STRINGS$ = CHR$(30H)
(STRING$ is loaded with `0')
STRINGS$ = CHR$(2AH)
(STRING$ is loaded with `*')
7.10
ASC% Function
Format:
ASC%(string)
where:
string can be a string variable or string expression.
The function returns the ASCII value of a single string character (the
opposite of the CHR$ function):
STRING$ = `5'
NUMBER% = ASC%(STRING$) (NUMBER% has the
ąąąąąąąąąvalue 35H)
7.11
LEN% Function
Format:
LEN%(string expression)
where:
expression must be of string type.
The function returns the length of the string expression:
STR_LEN% = LEN%(`STRING') (STR_LEN% is loaded
ąąąąąąąąąăwith 6)
STR1$ = `AVCDFG'
STR_LEN% = LEN%(STR1$ + 23") (STR LEN% is
ąąąąąąąąąloaded with 8)
7.12
STR$ Function
Format:
STR$(expression)
where:
expression must be of numeric (integer or real) type.
The function returns a string of characters from a numeric
expression:
STRING$ = STR$(1224)
(STRING$ is loaded with 1224)
NUM1% = 32
STRING$ = STR$(NUM1%*3) (STRING$ is loaded with 96)
STRING$ = STR$(388.73612) (STRING$ is loaded with
ąąąąąą+.38873612E03)