Hi Thorsten,

> I wonder if there actually is a way to directly print ^@ in PicoLisp for a
> "non-printable" hex "00", instead of NIL?

As we see from the previous discussion, this is not an issue of printability.
Other control characters may also be non-printable. It is an issue of
binary data vs. symbol names.

But you can of course print a caret and an at-mark instead of NIL

   (prin (or (something) "\^@"))

> Wrt the application, I just have to deal with fixed length hex strings (!)
> where the values at certain offsets carry semantics, conversions are done,
> and it's crucial that values stay in that position, the NUL values matter.

Yes, but why do you need to convert it to a string? I would process these data
all exclusively as a list of numbers, and do the final printing explicitly (if
needed at all). This printing may print '0' as "\^@", and also take care of
other control characters and non-printable stuff.

☺/ A!ex

UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to