proc char {v} {add [binary format c $v]}
+proc RAW {v} {add $v}
proc EOC {} {char [expr 0x00]}
proc NIL {} {char [expr 0x01]}
proc FALSE {} {char [expr 0x02]}
}
}
-proc RAW {t v} {
- char $t
- add $v
-}
-
namespace export EOC NIL FALSE TRUE HEXLET MAGIC INT STR BIN RAW
namespace export TAI64 UTCFromISO
namespace export LIST MAP SET LenFirstSort BLOB
dump 'MAP {a {LIST {NIL}}}' >map-foo
dump 'TAI64 [UTCFromISO "1970-01-01 00:00:00"]' >tai-utc0
dump 'TAI64 -11' >tai-before
-dump 'RAW [expr 0x18] [binary decode hex "40000000586846A4"]' >tai-leap
+dump 'RAW [binary decode hex "1840000000586846A4"]' >tai-leap
dump 'TAI64 1234 1234' >tai-ns
dump 'TAI64 1234 1234 1234' >tai-as
dump "MAGIC fuzz" >magic
}}
}}
floats {LIST {
- {RAW [expr 0x11] [binary decode hex "01020304"]}
+ {RAW [binary decode hex "1101020304"]}
}}
nil NIL
bool {LIST {TRUE FALSE}}
{MAP {}}
{BLOB 123 ""}
{HEXLET "00000000-0000-0000-0000-000000000000"}
- {RAW [expr 0x18] [binary decode hex "0000000000000000"]}
+ {RAW [binary decode hex "180000000000000000"]}
}}
dates {LIST {
{TAI64 1234567890}