Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®
Compiler Warning 1803
compiler warning: Possible data loss: LONG_INTEGER to
A LONG_INTEGER result was assigned to an INTEGER variable or passed to a
function for an INTEGER parameter. The 32-bit LONG_INTEGER will be
truncated to 16-bit value and assigned to the integer, resulting in a loss of data.
•
Make sure all the datatypes within an expression are of the same datatype.
•
Make sure the parameter of a function being called is of the same datatype as
the argument being passed in.
•
Make sure the return value of a function matches the destination's datatype.
The following are examples of this warning:
LONG_FUNCTION MyFunc( INTEGER x )
{
INTEGER i;
LONG_INTEGER j;
i = i;
j = i;
j = j;
i = j;
Call MyFunc( i ); // ok
Call MyFunc( j ); // warning
i = MyFunc( 5 );
assigned a
}
INTEGER assignment
// ok – both sides of the assigment are of
//
the same datatype
// ok – no loss of data
// ok – both sides of the assigment are of
//
the same datatype
// warning – LONG_INTEGER being assigned to
//
an INTEGER
// warning – the integer, i, is being
//
LONG_INTEGER value
Software
®
SIMPL+
335
Need help?
Do you have a question about the SIMPL+ and is the answer not in the manual?
Questions and answers