[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
null string oddities
From: |
Bill Schottstaedt |
Subject: |
null string oddities |
Date: |
Fri, 19 Sep 2008 12:34:03 -0700 |
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
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)
- null string oddities,
Bill Schottstaedt <=