Writes a binary table.
WRITETB("filename", type, data)
"filename" |
- |
A string. The name of the binary file to write. |
type |
- |
An integer, the binary format type of the data file to store described by either its name or integer code. Valid arguments are: |
Name |
Code |
Data Type |
Range |
SBYTE |
1 |
Signed Byte |
-128 to +127 |
UBYTE |
2 |
Unsigned Byte |
0 to 255 |
BYTE |
2 |
(same as UBYTE) |
0 to 255 |
SINT |
3 |
Signed Integer |
-32768 to +32767 |
UINT |
4 |
Unsigned Integer |
0 to 65535 |
LONG |
5 |
4-byte Signed Integer |
-2,147,483,648 to +2,147,483,647 |
FLOAT |
6 |
4-byte Floating Point |
-1037 to +1038 |
DOUBLE |
7 |
8-byte Floating Point |
-10-307 to +10308 |
ULONG |
8 |
4-byte Unsigned Integer |
0 to 4,294,967,295 |
|
1000 + N |
N-byte Signed Integer |
-28N-1 to 28N-1-1 |
|
2000 + N |
N-byte Unsigned Integer |
0 to 28N-1 |
data |
- |
A series or array. |
Nothing.
writetb("bin.dat", SINT, {{1, 2, 3}, {4, 5, 6}});
mydata = readtb("bin.dat");
writes the 2x3 array
{{1, 2, 3},
{4, 5, 6}}
to the file bin.dat as signed integers and reads the array into the variable mydata.
See READTB to read a binary table created by WRITETB.
WRITETB does not currently handle DELTAX, XOFFSET or Units.