^ starts an escape sequence.
: (mapcar char (range 0 64))
-> (NIL "^A" "^B" "^C" "^D" "^E" "^F" "^G" "^H" "^I" "^J" "^K" "^L" "^M"
"^N" "^O" "^P" "^Q" "^R" "^S" "^T" "^U" "^V" "^W" "^X" "^Y" "^Z" "^[" "^\"
"^]" "^^" "^_" " " "!" "\"" "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "."
"/" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ":" ";" "<" "=" ">" "?" "@")
# I think You see the pattern.

: (setq v1 "^ ")
-> $384402410  # For example.
: (length v1)
-> 0
: (char v1)
-> 0
# NULL character.

I think that sequences that are not shown above are undefined and actual
results are coincidence of implementation.  I haven't found it in docs.
Source code of interpreter should explain it best, but I can't understand
it yet.



On Tue, Jul 1, 2014 at 5:47 AM, Chris Double <chris.dou...@double.co.nz>
wrote:

> What is the special magic that ^ does in strings? If I do the following:
>
>   (prinl "hello ^ world")
>
> Then only "hello " is printed. If I read using (read) a string
> containing '^' it is similarly truncated.
>
> --
> http://www.bluishcoder.co.nz
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to