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 #116 background imageLoading...
Page #116 background image
Reserved Identifiers
100
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions
The keywords and run-time library function supported by NetLinx are described in the table below.
Compiler Directives (Cont.)
#INCLUDE To include a file in a program, use the keyword #INCLUDE followed by the file-
name in single quotes.
DEFINE_PROGRAM
(* Program statements can go here *)
#INCLUDE 'TEST.AXI'
(* More program statements can go here *)
When the compiler reaches the #INCLUDE statement, it jumps into the speci-
fied file and continues compiling. When it has reached the end of that file, it
comes back to the line following the #INCLUDE statement and continues com-
piling.
#WARN This compiler directive displays a warning message after the program is com-
piled. Its primary purpose is to remind you of certain conditions related to the
program.
#WARN 'This code is obsolete'
#WARN 'This code is obsolete'
Keywords & Run-Time Library Functions
__DATE__ __DATE__ is replaced by a string (mm/dd/yy) containing the date of compila-
tion. The example below sends the date of compilation to a variable text button
on a touch panel.
SEND_COMMAND TP, "'!T',1,__DATE__"
__FILE__ At compile time, this keyword is replaced with a string that contains the filename
of the currently executing program file.
__LDATE__ At compile time, this keyword is replaced by a string (mm/dd/yyyy), containing
the date of compilation. The example below sends the date of compilation to a
variable text button on a touch panel.
SEND_COMMAND TP, "'!T',1,__LDATE__"
__LINE__ At compile time, this keyword is replaced by a constant that contains the line
number the keyword is on.
SEND_STRING 0,"ITOA(__LINE__)"
__NAME__ At compile time, this keyword is replaced by a string that contains the
PROGRAM_NAME description found on the first line of the program.
__TIME__ At compile time, this keyword is replaced by a string (hh:mm:ss) representing
the time of compilation. The example below sends the time of compilation to a
variable text button on a touch panel.
SEND_COMMAND TP, "'!T',1,__TIME__"
ABS_VALUE ABS_VALUE provides the absolute value of a variable. It will take any intrinsic
variable type and return the same type.
AbsVal ABS_VALUE (Value)
DEFINE_VARIABLE
SLONG Var1, Var2
DEFINE_START
Var1 = -1
DEFINE_PROGRAM
Var2 = ABS_VALUE(Var1) // Var2 = 1
ACTIVE See SELECT...ACTIVE on page 148.

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