Function used to manipulate a real value, in turn returning a real value, but modified so that it is in the field of valid values for a unit of type unsigned int 16-bit (equivalent to assigning an unsigned int 16 the incoming data and then copying this data into another real variable).
Syntax |
real r2m16 (real value) |
---|---|
value |
Is a generic expression of type real that provides the function with the data to manipulate |
result |
Returns the converted value |
Validity |
Rule, Task |
Note |
Rules for converting data from real to unsigned 16 result in the following table:
Incoming value |
Returned value |
---|---|
0 |
0 |
17 |
17 |
65535 |
65535 |
65536 |
0 |
65537 |
1 |
-1 |
65535 |
-17 |
65519 |
-65535 |
1 |
-65536 |
0 |
-65537 |
65535 |