Converts data to the bytes as written on disk.
At times it is useful to examine the details of binary data. Traditionally in VEE the process would be to write the data to a file on disk in binary format and then read in the bytes. Using file IO like this can be fragile and is slow at best. This object bypasses the file IO and creates the bytes directly within VEE. And since it does not use loops, it is very fast.
menu: veeos ==> Data ==> bytes
library: dataLib
o_bytes(asReal64(pi)) returns 24 45 68 84 251 33 9 64
o_bytes(asUint8(5)) returns 5
o_bytes(asint16(5)) returns 5 0
This function is likely only useful in rare cases, but it was done largely as a challenge to see if it was feasible to accomplish without using loops.
VEE 7.0+, all platforms