[MOO-Discuss] Re: [Lambdamoo-server] GammaMOO
Status: Planning
Brought to you by:
luke-jr
From: H. P. A. <hp...@zy...> - 2004-04-12 01:50:21
|
Luke-Jr wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 30 March 2004 08:10 pm, H. Peter Anvin wrote: > >>Luke-Jr wrote: >> >>>- -- ASCII builtin functions: asc(STR) returns an integer value of the >>> first character in a string. chr(INT) returns a string containing a >>> single ASCII character specified by the input integer. >> >>ord(STR) would be better, as it's what it's called in Pascal and Perl, > > asc() is used in some languages, also. >>and unlike asc() doesn't imply any particular coding system. > > What does it do, then? asc() returns the INT based on the ASCII coding system. > There is another bifunc for Unicode and octet values. > Actually, what would *really* make more sense would be to have ucs() or ord() return a list corresponding to the characters of the string. Similarly, chr() should be able to take an arbitrary number of integers. I have some patches you might find useful at: ftp://ftp.vas.nu/pub/vas/moo/moo-1.8.1-vas.tar.gz -hpa |