Unfortunately, not much. OSX just seems to be very slow at handling text in Director.
A minor improvement might be the following:
cnt = reallyBigString.length repeat with i = 1 to cnt myCodeList.append(charToNum(reallyBigString.char[i]) end repeat
Note: I don't know that the use of more dot-syntax language will speed things up. It's just how I write Lingo. The efficiency is in not assigning the unnecessary "thisCode" variable each iteration and perhaps using a local variable "cnt" (count) instead of number of chars each iteration might save a little.
But again, OSX is just slow with text.
Regards,
Daniel
On May 1, 2004, at 1:32 AM, 2702NET wrote:
Hi Folks,
I need to grab ASCII codes for chars in a very large string and drop those codes into a list. At the moment, I'm doing the obvious and simple i.e. looping to the number of chars in the big string and returning the code for each char retrieved with charToNum() then appending the code to the list.
repeat with x = 1 to the number of chars in reallyBigString thisCode = charToNum(char x of reallyBigString) append(myCodeList,thisCode) end repeat
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?
TIA,
Gilles
[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!]
Daniel Nelson Blue Jade Creative Enterprises LLC
[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!]
