From Xojo Documentation


MemoryBlock.SingleValue(Offset as Integer) As Double

Supported for all project types and targets.

Returns a 4-byte representation of a single-precision floating number as a Double. Offset is in bytes from the beginning of the MemoryBlock.

Sample Code

The following example sets a value in a MemoryBlock using Single and then gets it.

Var d As Double
Var m As New MemoryBlock(8)
m.SingleValue(0) = 256

d = m.SingleValue(0)