is (char 0) correct?

For the Compleat Fan
Locked
Sammo
Posts: 180
Joined: Sat Dec 06, 2003 6:11 pm
Location: Loveland, Colorado USA

is (char 0) correct?

Post by Sammo »

> (char 2) --> "\002"
> (char "\002") --> 2
> (char (char "\002")) --> "\002"

> (char 1) --> "\001"
> (char "\001") --> 1
> (char (char "\001")) --> "\001"

> (char 0) --> ""
> (char "\000") --> 0
> (char (char "\000")) --> ""

Shouldn't (char 0) --> "\000"?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

yes that is a bug, it should be:

(char 0) => "\000" ; not ""

I will post a new developers release tomorrow with a fix for '(char 0)' and recognition of the precision spec for strings in format:

(format "%5.2" "hello") => " he" ; 3 spaces in front of 'he'

and a new documentation with Nigel's corrections: rev-4

Lutz

Locked