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.
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...