On Tue, 16 Oct 2001, Brian Wheeler wrote:
> _chr - create a string (S0) with the ascii value of I0
> _ord - return (in I0) the ascii value of the first character in S0
There's /got/ to be a better way to write these.  I propose making opcodes
specificly to do these.  This is an inner-loop kind of thing.

ord Ia, Sb -- sets the value of Ia to the value of the first (logical)
character in Sb.  (I'm assuming that there is some clear definition of
logical char for unicode, and that all strings can be normalized into
unicode.)
chr Sa, Ib -- sets Sa to be a single-character string with that caracter
having the value of Ib.  (The string is newly created)
ord Ia, Sb, Ic -- As the two-arg ord, but gets the value of the Ic'th
characer.
chr Sa, Ib, Ic -- As the two-arg chr, but sets the value of the Ic'th
character.  (Should we switch Ib and Ic?)  Using this with a string less
then Ic-1 characters long is illegal.

        -=-  James Mastros
-- 
Put bin Laden out like a bad cigar: http://www.fieler.com/terror
"You know what happens when you bomb Afghanastan?  Thats right, you knock
over the rubble."       -=- SLM

Reply via email to