Re: [Lambdamoo-server] GammaMOO

"H. Peter Anvin" <[email protected]> Sun, 11 Apr 2004 18:50:06 -0700
Newsgroups gmane.comp.lang.moo.general
Message-ID <[email protected]>
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


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click