Re: Printed representation of (char 0) ?

2024-02-13 Thread Tomas Hlavaty
On Tue 13 Feb 2024 at 08:35, Thorsten Jolitz wrote: > But shouldn't hex 23232424 print to something like ##^N^N$$ > instead of no ^N could mean SO character with byte value 14 see the program ascii a NUL character would be displayed as ^@ > So the printed ASCII string (as char) carries all

Re: Printed representation of (char 0) ?

2024-02-13 Thread Alexander Burger
Hi Thorsten, > But shouldn't hex 23232424 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 w

Re: Printed representation of (char 0) ?

2024-02-13 Thread Thorsten Jolitz
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

Re: Printed representation of (char 0) ?

2024-02-13 Thread picolisp
Hi Thorsten, I agree with the others, that's not a string you are processing. Strictly speaking, PicoLisp text functions and PicoLisp strings (and symbol names) must not contain NULL character. How about processing this fixed-size values in binary, using (rd 'cnt) and (wr 'cnt) ? Important:

Re: Printed representation of (char 0) ?

2024-02-13 Thread 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.