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 #144 background imageLoading...
Page #144 background image
Reserved Identifiers
128
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
FORMAT (Cont.) The result is a formatted text string.
fTemperature = 98.652
STR = FORMAT('The current temperature is
%3.2f',fTemperature)
// Displays "The current temperature is 98.65"
The table below shows some examples of the output of FORMAT for several dif-
ferent format lines and values:
FORMAT Statement Result of FORMAT function
FORMAT('%-5.2f',123.234) '123.23'
FORMAT('%5.2f',3.234) '3.23'
FORMAT('%+4d',6) '+6'
FTOA This function converts a floating-point value to an ASCII string containing the
decimal representation of the number.
CHAR[ ] FTOA (DOUBLE Num)
Parameters:
• Num: Floating-point number to convert to a decimal string.
The result is a character string that contains the decimal representation of the
specified floating-point number. The character representation will use expo-
nents if necessary.
STRING = FTOA(123.4) // STRING = '123.4'
GET_BUFFER_CHAR This keyword removes characters from a buffer.
Result = GET_BUFFER_CHAR (Array)
Array may be either a character array or wide character array; the operation is
identical in either case.
The result is a CHAR or WIDECHAR value depending on the variable type of
Array.
GET_BUFFER_CHAR has a two-part operation:
1. Retrieve the first character in the buffer.
2. Remove the retrieved character from the buffer and shift the remaining
characters by one to fill the gap.
GET_BUFFER_STRING This function removes characters from a buffer.
Result = GET_BUFFER_STRING (Array, Length)
Array may be either a character array or wide character array; the operation is
identical in either case. Length is the number of characters to remove.
Result is a CHAR or WIDECHAR value depending on the variable type of Array.
GET_BUFFER_STRING has a two-part operation:
1. Retrieve <length> number of characters from the buffer.
2. Remove the retrieved character from the buffer and shift the remaining
characters up to fill the gap.

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