The OpenD Programming Language

ionPut

Examples

ubyte[9] data;
assert(ionPut(data.ptr, -16.0) == 9);
assert(data[0] == 0x48);
assert(data[1] == 0xC0);
assert(data[2] == 0x30);
assert(data[3] == 0x00);
assert(data[4] == 0x00);
assert(data[5] == 0x00);
assert(data[6] == 0x00);
assert(data[7] == 0x00);
assert(data[8] == 0x00);

assert(ionPut(data.ptr, 0.0) == 1);
assert(data[0] == 0x40);

assert(ionPut(data.ptr, -0.0) == 9);
assert(data[0] == 0x48);
assert(data[1] == 0x80);
assert(data[2] == 0x00);
assert(data[3] == 0x00);
assert(data[4] == 0x00);
assert(data[5] == 0x00);
assert(data[6] == 0x00);
assert(data[7] == 0x00);
assert(data[8] == 0x00);

Meta