Reserved Identifiers
152
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
STACK_VAR
This keyword specifies a non-static variable. A non-static variable's value is re-
initialized every time the statement block in which it is declared is executed.
References to
STACK_VAR
variables are not allowed within waits.
STACK_VAR
s are temporary variables that cease to exist when the block in
which they are declared is exited.
If neither the LOCAL_VAR nor the STACK_VAR keyword is specified,
STACK_VAR is assumed.
STRING
This keyword defines a section in a
DATA
event handler for processing
SEND_STRING
instructions.
STRING_TO_VARIABLE
(VARIABLE DECODE)
This routine takes the Encode data from buffer and loads the values into the
DECODE
variable. The
DECODE
variable must match the type of the variables in
the encoded string. When the
ENCODE
variable is a structure, the decode vari-
able members must match in type and order. If the number of members of the
structures doesn't match then the routine will fill all it can or skip any unused
data members.
SINTEGER STRING_TO_VARIABLE (DECODE, CHAR BUFFER[ ], LONG
POSITION)
Parameters:
•
DECODE
: Any type of variable. This is the variable to be decoded into.
•
BUFFER
: Must be of char array type. This is where the encoded data is found.
•
POSITION
: This is where the first byte of the decode data. It is also modified
to point to the next location after the last decoded byte. That means that
successive calls to this function can be made without modifying position. The
position should be set to one on the first call.
Result:
• 2: Decode data too small, more members in structure
• 1: Structure too small, more members in decode string
• 0: Decoded OK
• -1: Decode variable type mismatch
• -2: Decode data too small, decoder ran out of data
STRUCTURE
This keyword introduces the declaration of a
STRUCTURE
data type.
STRUCTURE <name>
{
[<type>] <data1>
[<type>] <data2>
.
.
}
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...