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!]

Reply via email to