2008/9/19 Bill Schottstaedt <[EMAIL PROTECTED]>:
> I thought it odd that:
>
> guile> (string-length "")
> 0
> guile> (string-ref "" 3)
> #\nul
>
> but:
>
> guile> (string-set! "" 123 #\a)
> guile> (string-ref "" 123)
> #\a

Those _do_ look dangerous.  I'll take a look...

> guile> (substring "" 123 124)
>
> Backtrace:
> In standard input:
>   6: 0* [substring "" {123} 124]
>
> standard input:6:1: In procedure substring in expression (substring "" 123 
> ...):
> standard input:6:1: Value out of range 0 to 0: 123
> ABORT: (out-of-range)

At last, some bounds checking, hooray!

    Neil


Reply via email to