SGET_BUFFER
Read a SINGLE located in a memory area.
WebVue support - Yes.
Syntax
SinVal = SGET_BUFFER(Handle, Offset);
Return type: SINGLE.
Argument |
Meaning |
Handle |
The location of the memory buffer as returned by ALLOC_BUFFER. Type LONG. |
Offset |
The offset in bytes at which the integer is to be found. Any numeric type. |
Execution
Return: |
A SINGLE located in a memory buffer allocated by ALLOC_BUFFER. |
Example
SUB main()
'Declare variables
DIM lngBuffer1 as Long;
DIM strLine as Str;
DIM sngResult as Single;
DIM intLengh as Integer;
'Create a buffer
lngBuffer1 = ALLOC_BUFFER(110);
strline = "123.34;string_here;345;123456789;‚t‚\n";
'Put the string srtline into the buffer
PUT_BUFFER(lngBuffer1, 0, strline);
sngResult = SGET_BUFFER(lngBuffer1,0);
PRINT("Result: ",sngResult);
'Display "Result: 5.10584E+256"
FREE_BUFFER(lngBuffer1); 'release the memory area
END SUB