Page 1 of 1

'explode' error

Posted: Fri Jul 27, 2007 1:17 pm
by Fanda
Hello Lutz!

Function 'explode' returns strange results when exploding strings and using numbers bigger than the length of a string:

Code: Select all

> (explode "abc" 1)
("a" "b" "c")
> (explode "abc" 2)
("ab" "c")
> (explode "abc" 3)
("abc")
> (explode "abc" 4)
("abc\000")
> (explode "abc" 5)
("abc\000\000")
> (explode "abc" 6)
("abc\000\000\002")
> (explode "abc" 7)
("abc\000\000\002=")
> (explode "abc" 8)
("abc\000\000\002=\000")
> (explode "abc" 9)
CRASH

(explode "abc" 10)
("abc\000k\000=\000\130\000")
Exploding lists works ok.

Fanda

Posted: Fri Jul 27, 2007 7:13 pm
by Lutz
using numbers bigger than the length of a string
thanks, I will look into it.

Lutz