NetLinx Programming Overview
10
NetLinx Programming Language Reference Guide
Data Types
NetLinx expanded the types of data handled beyond the 8-bit and 16-bit integers handled by Axcess.
NetLinx supports integers up to 32-bits and signed values to allow positive and negative values. The
following table lists the data types available to NetLinx.
Constants
The
DEFINE_CONSTANT
section in NetLinx is similar to the
DEFINE_CONSTANTS
section in Axcess.
The scope of the constant extends throughout the module in which it is defined. If the
DEFINE_CONSTANT
section appears in the main program or in an include file, the constant's scope
extends globally throughout the program.
DEFINE_CONSTANT
accepts data in these formats:
The standard format for
DEFINE_CONSTANT
is:
<constant name> = <constant expression>
Data Types Supported by NetLinx
Type
Names
Used to Store
Data Ranges
Sample of Stored Values
CHAR
Single byte values and character
strings
0 to 255 (8-bit)
'a', 145, $FE, 'The quick gray fox'
WIDECHAR
Wide character strings dealing with
Unicode fonts that use 16-bit character
codes (and most Far-eastern fonts)
0 to 65,535 (16-bit) "'OFF',500"
INTEGER
Default variable value to store values
up to 65,535
0 to 65,535 (16-bit) 512, 32468, 12
SINTEGER
Signed integer values both greater
than and less than zero
32,767 to 32,767
(16-bit)
24, -24, 568, -568
FLOAT
Small real numbers with 5 digits of
precision
10e-38 to 10e38
1.2345
123.451.2345e5
-16.323.1415
DOUBLE
Large real numbers with 15 digits of
precision
10e-308 to 10e308 1.23456789012345
12,345,678.9012545
3.14159265358979
-0.048512934
LONG
Stores large integer values esp.
greater than 65,535
0 to 4,294,967,295
(32-bit)
1,000,000
2,000,046
SLONG
Signed large integer values less than -
32,767 and greater than 32,767
-2,147,483,647 to
2,147,483,647
(32-bit)
-1,000,000
1,000,000-2,000,000
2,000,000
DEFINE_CONSTANT Data Formats
Types
Formats
Examples
Decimal Integer
0000
1500
Hexadecimal Integer $000
$DE60
Binary Integer
000b
01110011b
Floating Point
000.0
924.5
Exponential Notation 0.0e0
.5e-12
Character
'c' or <char code> 'R' or 255
String Literal
'ssss’
'Reverse'
Содержание 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...