EasyManuals Logo

AMX NETLINX PROGRAMMING LANGUAGE User Manual

AMX NETLINX PROGRAMMING LANGUAGE
246 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #118 background imageLoading...
Page #118 background image
Reserved Identifiers
102
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
ATOI Converts a character representation of a number to an signed 32-bit integer.
The syntax:
SLONG ATOI (CHAR STRING[ ])
Parameters:
• STRING - string containing the character representation of the integer.
Result:
• A 32-bit signed integer representing the converted string.
• Any non-numeric characters in the string are ignored.
• ATOI returns the value representing the first complete set of characters that
represents an integer.
• Valid characters are "0" through "9" and "-" (minus sign), if it occurs before the
number. If no valid characters are found, zero is returned as a result.
Example:
Num = ATOI('100') // Num = 100
Note: While you can pass in larger values, ATOI will truncate any value outside
the range -2147483648 to 2147483647 to the value -2147483648 (if negative)
or 2147483647 (if positive).
ATOF This function converts a character representation of a number to a 64-bit float-
ing-point value. It recognizes a character representation of a signed integer or
floating-point number (with or without exponent).
FLOAT ATOF (CHAR STRING[ ])
Parameters:
• STRING: An input string containing the character representation of the
floating-point number.
The result is a 64-bit floating-point number representing the converted string.
Any non-numeric characters in the string are ignored. ATOF returns the value
representing the first complete set of characters that represents a floating-point
value. Valid characters are "0" through "9", ".", the sign designators ("+" and
"-"), and the exponent ("e" or "E"). If no valid characters are found, zero is
returned as a result.
Num = ATOF('The total = -1.25e-3')// Num = -0.00125
ATOL This function converts a character representation of a number to a signed 32-bit
integer.
SLONG ATOL (CHAR STRING[ ])
Parameters:
• STRING: A string containing the character representation of the integer.
The result is a 32-bit signed integer representing the converted string. Any non-
numeric characters in the string are ignored. ATOL returns the value represent-
ing the first complete set of characters that represents an integer. Valid charac-
ters are "0" through "9" and the sign designators "+" and "-". If no valid
characters are found, zero is returned as a result.
Num = ATOL('Value = -128000') // Num = -128000
BAND (&) This operator performs a bitwise AND on two data items, which can be constants
or variables.
BNOT (~) This operator performs a bitwise NOT on a constant or variable.
BOR (|) This operator performs a bitwise OR on two data items, which can be constants
or variables.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMX NETLINX PROGRAMMING LANGUAGE and is the answer not in the manual?

AMX NETLINX PROGRAMMING LANGUAGE Specifications

General IconGeneral
BrandAMX
ModelNETLINX PROGRAMMING LANGUAGE
CategorySoftware
LanguageEnglish

Related product manuals