Compiler Error Warnings Report Dialog; Disabling Compiler Warnings In Netlinx Code; Run-Time Errors - AMX NetLinx Studio Instruction Manual

Netlinx design v3.3 or higher
Table of Contents

Advertisement

Building and Debugging Source Code

Compiler Error Warnings Report dialog

This dialog is invoked via the Compiler Errors/Warning Report option in the Output Bar Context Menu (FIG. 178).
FIG. 178
Compiler Error Warnings Report dialog



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:
Run-Time Errors
Bad assign 2dim...
Bad assign Call...
Bad element assign... These errors occur if an assignment is attempted past the end of an array, or to the Ø location of
Bad Off... Bad On...
Bad To...
Bad re-assign Call...
Bad run token
Bad Set_Length...
Bad While
110
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.
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.
These errors occur if the Master Controller cannot assign a parameter in a CALL statement to the
parameter in the corresponding DEFINE_CALL statement.
an array (for example, ARRAY[Ø]).
These errors indicate that the device-channel or variable that is being referenced by an OFF, ON,
or TO keyword is out of range.
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.
This error occurs when the Master Controller does not understand a piece of data in the program
it is executing.
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.
This error occurs whenever a WHILE loop terminates due to the half-second timeout imposed on
WHILE loops.
NetLinx Studio - Instruction Manual

Advertisement

Table of Contents
loading

Table of Contents