InterpretAs
Syntax
dword interpretAsDword(float x);
float interpretAsFloat(dword x);
qword interpretAsQword(double x);
double interpretAsDouble(qword x);
Function
These functions interpret the actual bytes of a value as if the value was of another data type. InterpretAsFloatfor example takes the four bytes or a dword, interprets them as if they were four bytes of an IEEE single precision floating point number, and returns that number. InterpretAsDoubleinterprets eight bytes as if they were an IEEE double precision floating point number. InterpretAsDwordandInterpretAsQwordare the inverse functions.
Parameters
x The number which shall be interpreted.
Return Values
The interpreted value.
// take a message with 8 bytes representing a double numberon message MessageWithDoubleSignal{qword rawBytes;double value;rawBytes = this.qword(0);value = interpretAsDouble(rawBytes);write("The value is %g", value);}