[Ecls-list] *READ-BASE* seems to affect float parsing

Robert Dodier robert.dodier at gmail.com
Thu Mar 5 15:42:27 UTC 2009


Hello,

I am working with ECL as built from CVS sometime in Dec 2008.

It appears that *READ-BASE* affects how floats are parsed.

(setq *read-base* 10.)
(type-of (read-from-string "1e0"))
 => SINGLE-FLOAT
(setq *read-base* 2.)
(type-of (read-from-string "1e0"))
 => SYMBOL

According to CLHS, it seems *READ-BASE* should not affect
float parsing. Is the observed behavior a bug?

If there is a decimal point present, the string is parsed as a
float, as expected.

(setq *read-base* 2.)
(type-of (read-from-string "1.0e0"))
 => SINGLE-FLOAT

Thanks for your attention to this.

Robert Dodier




More information about the ecl-devel mailing list