This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Sign of uniform-vector of characters


I am puzzled by the sign of characters in guile-core-980123:

In ordinary vectors, characters are unsigned:

guile> (define v (make-vector 1 #\a))
guile> (vector-set! v 0 (integer->char 128))
guile> (vector-ref v 0)
#\200

In uniform vectors, characters appear to be signed:

guile> (define v (make-uniform-vector 1 #\a))
guile> (uniform-vector-set! v 0 (integer->char 128))
guile> (uniform-vector-ref v 0)
#\-200

I would prefer that characters are always unsigned. Signed characters
does not have a valid read syntax:

guile> #\-200
ERROR: In procedure -200:
ERROR: unknown # object: #\
ABORT: (misc-error)


Sorry if this has already been discussed and/or corrected!

	Regards,

	Ole Myren Røhne