2020-08-26 00:27:06 +03:00
< html >
< head >
< title > imperative< / title >
< link href = "../docs-assets/Breadcrumbs.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< meta name = "viewport" content = "width=device-width initial-scale=1" >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
< meta http-equiv = "Content-Language" content = "en-gb" >
< link href = "../docs-assets/Contents.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Progress.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Navigation.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Fonts.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Base.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< / head >
< body class = "commentary-font" >
< nav role = "navigation" >
2022-04-28 19:37:28 +03:00
< h1 > < a href = "../index.html" >
2020-08-26 00:27:06 +03:00
< img src = "../docs-assets/Inform.png" height = 72" >
< / a > < / h1 >
2022-04-28 19:37:28 +03:00
< ul > < li > < a href = "../index.html" > home< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Compiler< / h2 > < ul >
< li > < a href = "../structure.html" > structure< / a > < / li >
< li > < a href = "../inbuildn.html" > inbuild< / a > < / li >
< li > < a href = "../inform7n.html" > inform7< / a > < / li >
< li > < a href = "../intern.html" > inter< / a > < / li >
< li > < a href = "../services.html" > services< / a > < / li >
2022-04-18 17:46:46 +03:00
< li > < a href = "../secrets.html" > secrets< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Other Tools< / h2 > < ul >
< li > < a href = "../inblorbn.html" > inblorb< / a > < / li >
< li > < a href = "../indocn.html" > indoc< / a > < / li >
< li > < a href = "../inform6.html" > inform6< / a > < / li >
< li > < a href = "../inpolicyn.html" > inpolicy< / a > < / li >
< li > < a href = "../inrtpsn.html" > inrtps< / a > < / li >
2022-04-07 01:30:32 +03:00
< / ul > < h2 > Resources< / h2 > < ul >
< li > < a href = "../extensions.html" > extensions< / a > < / li >
< li > < a href = "../kits.html" > kits< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Repository< / h2 > < ul >
< li > < a href = "https://github.com/ganelson/inform" > < img src = "../docs-assets/github.png" height = 18 > github< / a > < / li >
< / ul > < h2 > Related Projects< / h2 > < ul >
2022-04-28 19:20:06 +03:00
< li > < a href = "../../../inweb/index.html" > inweb< / a > < / li >
< li > < a href = "../../../intest/index.html" > intest< / a > < / li >
2020-08-26 00:27:06 +03:00
< / ul >
< / nav >
< main role = "main" >
2022-04-28 19:37:28 +03:00
< ul class = "crumbs" > < li > < a href = "../index.html" > Home< / a > < / li > < li > < a href = "../inform7n.html" > Inform7< / a > < / li > < li > < b > imperative< / b > < / li > < / ul >
2020-08-26 00:27:06 +03:00
< p class = "purpose" > Compiling imperative code inside phrase or rule definitions. This is version 1.< / p >
< hr >
< div class = "contentspage" >
< ul class = "chapterlist" >
< li >
< p class = "chapterentry" > < a name = "P" > < / a >
< span class = "chaptertitle" > Preliminaries< / span > < / p >
< ul class = "sectionlist" >
< li >
< p class = "sectionentry" > < a href = "P-wtmd.html" >
< spon class = "sectiontitle" > What This Module Does< / span > < / a > -
< span class = "sectionpurpose" > An overview of the imperative module's role and abilities.< / span > < / p >
< / li >
< / ul >
< / li >
< li >
< p class = "chapterentry" > < a name = "1" > < / a >
< span class = "chaptertitle" > Chapter 1: Configuration and Control< / span > < / p >
< ul class = "sectionlist" >
< li >
< p class = "sectionentry" > < a href = "1-im.html" >
< spon class = "sectiontitle" > Imperative Module< / span > < / a > -
< span class = "sectionpurpose" > Setting up the use of this module.< / span > < / p >
< / li >
< / ul >
< / li >
2020-08-26 12:52:50 +03:00
< li >
< p class = "chapterentry" > < a name = "2" > < / a >
2021-04-10 19:55:28 +03:00
< span class = "chaptertitle" > Chapter 2: Values< / span > < / p >
< p class = "chapterpurpose" > Compiling rvalues, lvalues and conditions.< / p >
< ul class = "sectionlist" >
< li >
< p class = "sectionentry" > < a href = "2-cv.html" >
< spon class = "sectiontitle" > Compile Values< / span > < / a > -
< span class = "sectionpurpose" > To compile specifications of values into Inter value opcodes or array entries.< / span > < / p >
< / li >
< li >
< p class = "sectionentry" > < a href = "2-cr.html" >
< spon class = "sectiontitle" > Compile Rvalues< / span > < / a > -
< span class = "sectionpurpose" > To compile rvalues into Inter value opcodes or array entries.< / span > < / p >
< / li >
< li >
< p class = "sectionentry" > < a href = "2-cl.html" >
< spon class = "sectiontitle" > Compile Lvalues< / span > < / a > -
< span class = "sectionpurpose" > To compile storage references into Inter value opcodes.< / span > < / p >
< / li >
< li >
< p class = "sectionentry" > < a href = "2-cc.html" >
< spon class = "sectiontitle" > Compile Conditions< / span > < / a > -
< span class = "sectionpurpose" > To compile Inter code to test a condition.< / span > < / p >
< / li >
2021-05-25 14:14:32 +03:00
< li >
< p class = "sectionentry" > < a href = "2-map.html" >
< spon class = "sectiontitle" > Matching Action Patterns< / span > < / a > -
< span class = "sectionpurpose" > Testing whether the current action matches an action pattern means compiling a complicated multi-clause condition, which is what this section does.< / span > < / p >
< / li >
< li >
< p class = "sectionentry" > < a href = "2-mgap.html" >
< spon class = "sectiontitle" > Matching Going Action Patterns< / span > < / a > -
< span class = "sectionpurpose" > Tweaks to compiling APs for the going action.< / span > < / p >
< / li >
2021-04-10 19:55:28 +03:00
< / ul >
< / li >
< li >
< p class = "chapterentry" > < a name = "3" > < / a >
< span class = "chaptertitle" > Chapter 3: Functions< / span > < / p >
2021-04-03 17:02:38 +03:00
< p class = "chapterpurpose" > Managing the compilation of Inter functions.< / p >
2020-08-26 12:52:50 +03:00
< ul class = "sectionlist" >
2021-04-02 19:33:37 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-sf.html" >
2021-04-02 19:33:37 +03:00
< spon class = "sectiontitle" > Stack Frames< / span > < / a > -
< span class = "sectionpurpose" > When Inform compiles imperative code, it does so in the context of a "stack frame".< / span > < / p >
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-lvs.html" >
2021-04-02 19:33:37 +03:00
< spon class = "sectiontitle" > Local Variable Slates< / span > < / a > -
< span class = "sectionpurpose" > The collection of Inter locals belonging to a stack frame.< / span > < / p >
< / li >
2020-08-26 12:52:50 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-lv.html" >
2020-08-26 12:52:50 +03:00
< spon class = "sectiontitle" > Local Variables< / span > < / a > -
< span class = "sectionpurpose" > Local variables are used for call parameters, temporary values, and other ephemeral workspace.< / span > < / p >
< / li >
2021-05-10 11:31:35 +03:00
< li >
< p class = "sectionentry" > < a href = "3-tv.html" >
< spon class = "sectiontitle" > Temporary Variables< / span > < / a > -
< span class = "sectionpurpose" > When the runtime code needs to borrow a global variable for a while.< / span > < / p >
< / li >
2021-03-23 14:21:15 +02:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-lp.html" >
2021-04-02 19:33:37 +03:00
< spon class = "sectiontitle" > Local Parking< / span > < / a > -
< span class = "sectionpurpose" > Like Free Parking in Monopoly, except that it is not free and has an overhead cost.< / span > < / p >
2021-03-23 14:21:15 +02:00
< / li >
2020-08-26 12:52:50 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-cb.html" >
2021-04-03 16:32:59 +03:00
< spon class = "sectiontitle" > Code Blocks< / span > < / a > -
2020-08-26 12:52:50 +03:00
< span class = "sectionpurpose" > Blocks of code are used to give conditionals and loops greater scope, as in more traditional programming languages.< / span > < / p >
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-fnc.html" >
2021-04-02 21:28:39 +03:00
< spon class = "sectiontitle" > Functions< / span > < / a > -
< span class = "sectionpurpose" > To compile Inter functions.< / span > < / p >
2020-08-26 12:52:50 +03:00
< / li >
2021-04-11 18:42:37 +03:00
< li >
< p class = "sectionentry" > < a href = "3-jl.html" >
< spon class = "sectiontitle" > Jump Labels< / span > < / a > -
< span class = "sectionpurpose" > Generating numbered families of identifier names to use as jump labels, and creating any associated array storage needed.< / span > < / p >
< / li >
2021-04-03 16:32:59 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-pr.html" >
2021-04-03 16:32:59 +03:00
< spon class = "sectiontitle" > Phrase Requests< / span > < / a > -
< span class = "sectionpurpose" > To store and later fill requests to compile To... phrases.< / span > < / p >
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-cls.html" >
2021-04-03 16:32:59 +03:00
< spon class = "sectiontitle" > Closures< / span > < / a > -
< span class = "sectionpurpose" > To provide the names of phrases as first-class values.< / span > < / p >
< / li >
2021-04-04 01:10:19 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "3-cid.html" >
2021-04-04 01:10:19 +03:00
< spon class = "sectiontitle" > Compile Imperative Definitions< / span > < / a > -
< span class = "sectionpurpose" > Compiling an Inter function from the body of an imperative definition.< / span > < / p >
< / li >
2020-08-26 12:52:50 +03:00
< / ul >
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "chapterentry" > < a name = "4" > < / a >
< span class = "chaptertitle" > Chapter 4: Propositions< / span > < / p >
2021-02-07 14:44:02 +02:00
< p class = "chapterpurpose" > Generating code to test or assert propositions from predicate calculus.< / p >
< ul class = "sectionlist" >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-cs.html" >
2021-04-09 02:04:34 +03:00
< spon class = "sectiontitle" > Compile Schemas< / span > < / a > -
< span class = "sectionpurpose" > Here we compile fragments of code from paraphrases written in Inform 6 notation, and use that ability to compile general predicate calculus terms.< / span > < / p >
2021-02-07 14:44:02 +02:00
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-ca.html" >
2021-02-07 14:44:02 +02:00
< spon class = "sectiontitle" > Compile Atoms< / span > < / a > -
2021-04-09 02:04:34 +03:00
< span class = "sectionpurpose" > Given an atom of a proposition we compile Inter code to test it, to make it henceforth true, or to make it henceforth false.< / span > < / p >
2021-02-07 14:44:02 +02:00
< / li >
2021-04-09 12:09:44 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-cp.html" >
2021-04-09 12:09:44 +03:00
< spon class = "sectiontitle" > Compile Propositions< / span > < / a > -
< span class = "sectionpurpose" > To compile a proposition within the body of the current function.< / span > < / p >
< / li >
2021-04-10 02:37:43 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-cl.html" >
2021-04-10 02:37:43 +03:00
< spon class = "sectiontitle" > Compile Loops< / span > < / a > -
< span class = "sectionpurpose" > To compile loop headers from a range of values expressed by a proposition.< / span > < / p >
< / li >
2021-02-07 14:44:02 +02:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-dtd.html" >
2021-02-07 14:44:02 +02:00
< spon class = "sectiontitle" > Deciding to Defer< / span > < / a > -
2021-04-09 12:09:44 +03:00
< span class = "sectionpurpose" > 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.< / span > < / p >
2021-02-07 14:44:02 +02:00
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-cad.html" >
2021-02-07 14:44:02 +02:00
< spon class = "sectiontitle" > Cinders and Deferrals< / span > < / a > -
2021-04-10 02:37:43 +03:00
< span class = "sectionpurpose" > Cinders are constants in deferred propositions referring to values in the original stack frame.< / span > < / p >
2021-02-07 14:44:02 +02:00
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "4-cdp.html" >
2021-02-07 14:44:02 +02:00
< spon class = "sectiontitle" > Compile Deferred Propositions< / span > < / a > -
2021-04-06 16:56:15 +03:00
< span class = "sectionpurpose" > To compile the Inter functions needed to perform the tests or tasks deferred as being too difficult in their original contexts.< / span > < / p >
2021-02-07 14:44:02 +02:00
< / li >
< / ul >
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "chapterentry" > < a name = "5" > < / a >
< span class = "chaptertitle" > Chapter 5: Invocations< / span > < / p >
2021-04-04 01:10:19 +03:00
< p class = "chapterpurpose" > Generating code to perform invocations of individual phrases.< / p >
2020-08-26 12:52:50 +03:00
< ul class = "sectionlist" >
2021-04-04 01:10:19 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-cbal.html" >
2021-04-04 01:10:19 +03:00
< spon class = "sectiontitle" > Compile Blocks and Lines< / span > < / a > -
< span class = "sectionpurpose" > Compiling a code block of lines from an imperative definition.< / span > < / p >
< / li >
2020-08-26 12:52:50 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-ci.html" >
2020-08-26 12:52:50 +03:00
< spon class = "sectiontitle" > Compile Invocations< / span > < / a > -
2021-04-05 19:55:34 +03:00
< span class = "sectionpurpose" > Generating code to perform an invocation.< / span > < / p >
2020-08-26 12:52:50 +03:00
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-ciac.html" >
2020-08-26 12:52:50 +03:00
< spon class = "sectiontitle" > Compile Invocations As Calls< / span > < / a > -
2021-04-06 02:19:15 +03:00
< span class = "sectionpurpose" > An invocation defined with Inform 7 source text is made with an Inter function call.< / span > < / p >
2020-08-26 12:52:50 +03:00
< / li >
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-cii.html" >
2020-08-26 12:52:50 +03:00
< spon class = "sectiontitle" > Compile Invocations Inline< / span > < / a > -
2021-04-06 16:56:15 +03:00
< span class = "sectionpurpose" > Here we generate Inter code to invoke a phrase from its inline definition.< / span > < / p >
2020-08-26 12:52:50 +03:00
< / li >
2021-02-07 14:44:02 +02:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-cste.html" >
2021-02-07 14:44:02 +02:00
< spon class = "sectiontitle" > Compile Solutions to Equations< / span > < / a > -
< span class = "sectionpurpose" > To compile code to solve an equation involving numerical quantities.< / span > < / p >
< / li >
2021-04-06 16:56:15 +03:00
< li >
2021-04-10 19:55:28 +03:00
< p class = "sectionentry" > < a href = "5-ca.html" >
2021-04-06 16:56:15 +03:00
< spon class = "sectiontitle" > Compile Arithmetic< / span > < / a > -
< span class = "sectionpurpose" > To compile code performing an arithmetic operation.< / span > < / p >
< / li >
2020-08-26 12:52:50 +03:00
< / ul >
< / li >
2020-08-26 00:27:06 +03:00
< / ul >
< / div >
< hr >
< p class = "purpose" > Powered by < a href = "https://github.com/ganelson/inweb" > Inweb< / a > .< / p >
< / main >
< / body >
< / html >