Hi Alex and beneroth,
there are system interfaces that don't handle binary data and send them as
hex strings to middleware for conversion ...
All I wanted was a quick way to cross check that conversion with PicoLisp,
and that was really easy, except that NUL problem, solved now.
But very interesting discussion, I'm playing around with rd and pr right
Thanks for the input

Am Mi., 14. Feb. 2024 um 08:04 Uhr schrieb Alexander Burger <

> 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