Hi Alex, Thomas,
thanks for your input, this is actually what I was looking for :
[image: image.png]
or even better:
[image: image.png]
I wonder if there actually is a way to directly print ^@ in PicoLisp for a
"non-printable" hex "00", instead of NIL?
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.
And I don't want to write a PicoLisp application for this, I just wanted an
easy way to produce the expected conversion result in PicoLisp as a
reference for comparison, and the above solution is fine for that.

Am Di., 13. Feb. 2024 um 09:09 Uhr schrieb Alexander Burger <
picolisp@software-lab.de>:

> Hi Thorsten,
>
> > But shouldn't hex 232300002424 print to something like ##^N^N$$ instead
> of
> > ##$$ ?
>
> The problem is that you try to handle binary data as symbols. This is not
> a good
> idea. Binary data are numbers.
>
> First of all, do you really have a hex message? Where does
> it come from? Normally I would expect a list of numbers
> as obtained with e.g.
>
>    (make (do 96 (link (rd 1))))
>
> If it is really a hexadecimal string, you can obtain the list
> of numbers with
>
>    : (make (for (L (chop "232300002424") (cut 2 'L)) (link (hex @))))
>    -> (35 35 0 0 36 36)
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to