Re: Joining things to form a variable name
Re: Joining things to form a variable name
- Subject: Re: Joining things to form a variable name
- From: Stephen Fitchett <email@hidden>
- Date: Wed, 1 Nov 2000 16:29:19 +1200
I've tried what you suggested, with a few modifications. Thanks, it helped
a lot, and I've now finished an update, reducing the size from about 80 000
bytes to about 25 000 bytes! 30% of the original size! It's also sped it up
a lot.
After changing a couple of things I couldn't figure out why it wouldn't
work. I had:
repeat with i from 97 to 122 by 1
set letterQuestion to display dialog {"What character would " & (ASCII
character i) & " decode to"} default answer (ASCII character i)
set theLetters to theLetters & text returned of letterQuestion
end repeat
I had changed some things thinking it might make it work, but it didn't.
After hours of thinking a lightbulb turned on in my head. The property
'theLetters' was set after all the 'property lettera : character 1 of
theLetters' and all that. Therefore, these properties wouldn't set because
they weren't told to. I decided the smallest way of fixing this was that
instead of having lettera, letterb thru to letterz as properties, I'd have
them as variables. The script now sets them after the repeat statement, as
'set lettera to character 1 of theLetters' etc.
To my surprise, there were no more errors! I better savour that memory.
It's unlikely to pass my way again!
On Mon, 30 Oct 2000 02:57:11 email@hidden wrote:
>
hi I dont know if I can help
>
>
here's a part I wrote...not sure if it is what you need.. email me if you want
>
>
>
property property_letters : {}
>
repeat with i from 65 to 90 by 1
>
set property_letters to property_letters & ,
>
(text returned of (display dialog "" default answer (ASCII character i
>
)))
>
end repeat
>
>
Regards,
>
John
------------------------------------------------
BCNUL8R,
Stephen Fitchett
"I like work. I can sit and watch it for hours."
------------------------------------------------