Thanks Buzz. Cool idea.

#1 building a limited-size string-driven proplist that contains all 256 chars & their charToNums().
(then the overhead for of the function calls is limited and DONE)

What do you mean when you say "limited-size?" Won't the above prebuilt propList always be the same size?


Thanks,

Gilles

On Saturday, May 1, 2004, at 17:12 US/Eastern, Buzz Kettles wrote:

At 2:32 AM -0400 5/1/04, you wrote:

This is very inefficient and slow, particularly under OS X. Is there any slick way to do this (more) efficiently?...perhaps break it up somehow to run more quickly?

I scanned thru the responses & didn't see anybody suggest this:


Don't do all those charToNum() function calls ...

I think I'd try this approach

#1 building a limited-size string-driven proplist that contains all 256 chars & their charToNums().
(then the overhead for of the function calls is limited and DONE)


#2 Use Colin's first-char approach to grab each char & then use that as an index into the prooList to get it's charToNum()

property pl

on createPL me
  pl = [:]
  repeat with i = 1 to 256
    pl[numToChar(i)] = i
  end repeat
end

& then just use pl{"a"] to get a 97 returned from the list

hth
-Buzz
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]



[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to