🔍

1: FileBinary (assign 1)

Reads or writes bytes

Syntax: x 1: y; 1:[x;y]

Whеre:

  • x is a two-element list (a string or a nested string representing type and a long vector or a scalar);
  • y is a byte vector.

o)(8;"j")1:0x1000000000000000 // big endian
1152921504606846976
o)("j";8)1:0x1000000000000000 // little endian
16
o)("ij";4 8)1:0x000100001000000000000000 // little endian
256i
16
o)

Supports reading records as list of vectors since 0.7.0. It requires nested string as type format. Only lower case type formats are supported. Returns list of vectors suitable for quick table conversion using flip. See below:

o)(,"xs";1 2)1: 0x017072037072
0x0103
`pr`pr
o)xx:(,"xg";1 16)1: 0x0102030405060708091011121314151617
0x01
,02030405-0607-0809-1011-121314151617
o)+`a`b!xx
a b
--------------------------------------
1 02030405-0607-0809-1011-121314151617

See repr format string for reference on types.