
Building and Debugging Source Code
110
NetLinx Studio - Instruction Manual
Compiler Error Warnings Report dialog
This dialog is invoked via the
Compiler Errors/Warning Report
option in the Output Bar Context Menu (FIG. 178).
Use the options in this dialog to specify what you want to include in the report (Errors, Warnings or both). By
default, both Errors and Warning are included.
Note that Warnings will not automatically preclude a successful compile operation. By contrast, Errors must
be corrected before your program can be compiled.
Disabling Compiler Warnings in NetLinx Code
In the
AXCESS Compiler
tab of the
Preferences
dialog, there are a number of Axcess compiler warnings that can be
enabled / disabled, but there are no corresponding options in the NetLinx Compiler tab for enabling / disabling NetLinx
compiler warnings.
Disabling NetLinx compiler warnings can be done in code by adding a #DISABLE_WARNING statement with a
warning number generated by the compiler. For example, if you are getting a warning you want to disable, such as:
WARNING: U:\My Documents\Studio\Test\DISABLE_WARNINGtest.axs(12). C10571: Converting type
[SINTEGER] to [INTEGER]
The warning number is 10571. Add the line to the beginning of the code file:
#DISABLE_WARNING 10571
The code will now compile without generating the specified warning.
Run-Time Errors
In many cases, a program is compiled and sent to the Master Controller error-free, but the System does not act in the way
it should. If the program code is correct, you should check for run-time errors. These errors occur in the Master
Controller, usually when it could not perform a particular operation in the program.
Run-Time errors are errors that occur during program execution, and are described below:
FIG. 178
Compiler Error Warnings Report dialog
Run-Time Errors
Bad assign 2dim...
These errors occur if an attempt is made to assign a two-dimensional array to a different type
(such as a variable or one-dimensional array), and vice versa.
Bad assign Call...
These errors occur if the Master Controller cannot assign a parameter in a CALL statement to the
parameter in the corresponding DEFINE_CALL statement.
Bad element assign... These errors occur if an assignment is attempted past the end of an array, or to the Ø location of
an array (for example, ARRAY[Ø]).
Bad Off... Bad On...
Bad To...
These errors indicate that the device-channel or variable that is being referenced by an OFF, ON,
or TO keyword is out of range.
Bad re-assign Call...
These errors occur when the Master Controller attempts to re-assign the parameter variables in a
DEFINE_CALL to the parameters in the corresponding CALL statement, and the assignment
cannot be made.
Bad run token
This error occurs when the Master Controller does not understand a piece of data in the program
it is executing.
Bad Set_Length...
These errors occur if the SET_LENGTH_STRING keyword tries to set the length value of an
array to a value greater than the array's storage capacity.
Bad While
This error occurs whenever a WHILE loop terminates due to the half-second timeout imposed on
WHILE loops.
Содержание NetLinx Studio
Страница 40: ...Working with Projects 28 NetLinx Studio Instruction Manual...
Страница 148: ...Communication Settings 136 NetLinx Studio Instruction Manual...
Страница 160: ...Working with Online Devices 148 NetLinx Studio Instruction Manual...
Страница 178: ...File Transfer Operations 166 NetLinx Studio Instruction Manual...
Страница 208: ...Tools Menu Options 196 NetLinx Studio Instruction Manual...
Страница 229: ...Setting Program Preferences 217 NetLinx Studio Instruction Manual...