Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Software Crestron 
SIMPL+
®
110 
z SIMPL+
®
Language Reference Guide - DOC. 5797G
Atol
Name:
Atol
Syntax:
LONG_INTEGER Atol(STRING SOURCE);
Description:
Converts a STRING to an LONG_INTEGER value. The conversion looks for the 
first valid character (0-9), and then reads until it finds the first invalid character. The 
resulting string of valid characters is then converted. The “-” is ignored, hence the 
output is an unsigned number [i.e., ATOL(“-1”) would yield 1 as the output]. If no 
valid value to convert is found, 0 is returned. If the integer exceeds 32 bits, the value 
returned is undefined.
Parameters:
SOURCE is a string containing characters that range from 0 to 9 to be converted.
Return Value:
An integer representing the given string value. Example:
STRING_INPUT IN$[100];
LONG_INTEGER VAL;
 
CHANGE IN$
{
VAL = ATOL(IN$);
PRINT(“Value of %s after ATOL is %ld\n”, IN$, VAL);
}
For example, if IN$ is “abc1234xyz”, then VAL will hold the number 1234. If IN$ is 
“-50”, then VAL will hold the number 50. 
Version:
SIMPL+ Version 3.00.02
Control System
2-Series Only