Logiweb(TM)

7.6.5 Bytes, byte lists, and byte trees

Prev Up Next Page 195 of 800 Search internet


Every once in a while it is useful to work with bytes rather than singletons. The benefits of using vectors, singleton lists, and vector trees instead of bytes, byte lists, and byte trees are massive, and thus Logiweb favors vectors, singleton lists, and vector trees at the expense of bytes, byte lists, and byte trees. Nevertheless, the base page has functions for converting between the different types:

vector2byte* ( x )
vt2byte* ( x )
bt2byte* ( x )
bt2vector* ( x )
bt2vector ( x )

Examples of use read:

vector2byte* ( !"ab" ) == << 97 ,, 98 >>

vt2byte* ( !"a" :: !"b" ) == << 97 ,, 98 >>

bt2byte* ( 97 :: 98 ) == << 97 ,, 98 >>

bt2vector* ( 97 :: 98 ) == << !"a" ,, !"b" >>

bt2vector ( 97 :: 98 ) == !"ab"

Prev Up Next Page 195 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05