On Saturday, October 25, 2003, at 02:33 PM, Rob Cozens wrote:
I don't see how a compiled script can see a constant as other than a special global variable that cannot be changed.
I could address this a little better in relation to HyperCard...where I at least thought I understood what was interpreted and what was compiled and when.
A compiled script should see a constant as an address to a static value, no?
I think this is quite reasonable for a local constant.
I would have to give it some thought as to how this would work for global constants. Hmmm.
I'd have to run some tests, but I have seen scripts compiled at the time the stack (or app?) is loaded and when the owner card is shown.
Maybe it could be made illegal for the script of the main stack of an application to be modified. Maybe that script can be always compiled first. I would guess that that last one is already the case. Maybe then, when the others are compiled, they can point to a location already set up by the compiling of the main stack script. The compiling of the main stack script is unique in that the global constants have values and locations are allocated for the values and a name to location table is set up for use in compiling other scripts.
I'm doing a lot of guessing here. But, I think there might actually be a way to optimize that as you suggest.
Even so, having the compiling of scripts depend on the compiling of other scripts seems weird, but I'm willing to taste new ideas.
Dar Scott
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
