The humble Substack

Graham Samuel livfoss at
Mon Nov 18 04:24:25 EST 2013

Hi Cal

Can you explain your question a bit further? As far as I know (and I am NOT one of those reading the code of the LC engine), stacks and substacks in the same file, say xxx.livecode, have the same status. I think the developer can consider that the original format of both stacks and substacks persists in some way, even though they may be tokenized or otherwise made ready for execution. As I envisage it, this is not compilation in the sense of earlier-generation languages - I mean nothing ends up as binary code to be directly executed by the platform the program is running on. One consequence of this not-completely-compiled approach is that the actual text of scripts is still accessible: because of this, not only to "do" statements work, having the form

do <some script text, which can be constructed on the fly>

but also other forms of construction are permissible, such as constructing a variable name and then doing something with that variable, again on the fly.

Where I don't understand what you are asking is what your intention is with respect to substacks. There is a common model used in constructing apps in the LiveCode world where the only pre-compiled part is an opening stack (the "splash"), which then invokes other stacks, which themselves have never been pre-compiled at all in the sense of being made into standalones. One advantage of this is that it gets around the prevention of self-modifying programs of all modern OSs. A non-compiled stack used in this way is not seen as a program (standalone) by the OS and can therefore contain data and states which can be saved during the execution of the program. I use that model a lot myself - works a treat.

It would be interesting to hear what you're trying to do.


On 18 Nov 2013, at 01:55, Cal Horner wrote:

> Here is another gap in my education, that I am trying to fill.
> When a combination mainstack/substack(s) application is compiled into a
> standalone, how much of substack is  converted from an interpreted
> environment into a compiled application?
> The Mainstack/substack combination that has been developed is used only as
> windows for the application. Either to display calculated results or if the
> data has been keyed into the data-entry windows is put into a database.
> It just seems that what I've been able to glean from assorted books and
> sites this information has been left out. Or, perhaps I've just missed the
> simple explanation. 
> If anyone knows the answer I would appreciate a sharing of the knowledge.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list