This function writes a REAL to a buffer at the specified offset.
Syntax |
set_real (buffer, i32 offset, real set_val) |
---|---|
buffer |
Can be an array, structure, register |
offset |
Offset in bytes |
set_val |
The real value to be set in the buffer |
Validity |
Task, Rule |
Note |
range check is NOT performed, it is up to the user to check that adding the offset and the data size does not exceed the maximum buffer size. See example. If the user wishes to write a real into the 'data' buffer of a structure of type bbc_msguser then he must use the function bcc_set_double(). The mirror function is the get_real() |
Once you have loaded the example program on a control, via a shell you can verify that set_real works. To do this, set a value between 0 and 127 - sizeof(my_data) to the variable offset, then set a non-zero value to the variable set_val and verify that the variable my_data is equal to set_val.
|