🏡 Back Home
imperative
Info
Link: [https://ganelson.github.io/inform/imperative-module/index.html]] https://ganelson.github.io/inform/imperative-module/index.html)
Up: [[Inform7 Compiler Readers Guide]]
Contents
-
- Chapter 1: Configuration and Control
- Imperative Module - Setting up the use of this module.
- Chapter 2: Values
- Chapter 3: Functions
- Stack Frames - When Inform compiles imperative code, it does so in the context of a "stack frame".
- Local Variable Slates - The collection of Inter locals belonging to a stack frame.
- Local Variables - Local variables are used for call parameters, temporary values, and other ephemeral workspace.
- Temporary Variables - When the runtime code needs to borrow a global variable for a while.
- Local Parking - Like Free Parking in Monopoly, except that it is not free and has an overhead cost.
- Code Blocks - Blocks of code are used to give conditionals and loops greater scope, as in more traditional programming languages.
- Functions - To compile Inter functions.
- Jump Labels - Generating numbered families of identifier names to use as jump labels, and creating any associated array storage needed.
- Phrase Requests - To store and later fill requests to compile To... phrases.
- Closures - To provide the names of phrases as first-class values.
- Compile Imperative Definitions - Compiling an Inter function from the body of an imperative definition.
- Chapter 4: Propositions
- Compile Schemas - Here we compile fragments of code from paraphrases written in Inform 6 notation, and use that ability to compile general predicate calculus terms.
- Compile Atoms - Given an atom of a proposition we compile Inter code to test it, to make it henceforth true, or to make it henceforth false.
- Compile Propositions - To compile a proposition within the body of the current function.
- Compile Loops - To compile loop headers from a range of values expressed by a proposition.
- Deciding to Defer - To decide whether a proposition can be compiled immediately, in the body of the current function, or whether it must be deferred to a function of its own, which is merely called from the current function.
- Cinders and Deferrals - Cinders are constants in deferred propositions referring to values in the original stack frame.
- Compile Deferred Propositions - To compile the Inter functions needed to perform the tests or tasks deferred as being too difficult in their original contexts.
- Chapter 5: Invocations