1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-09 02:24:21 +03:00
inform7/docs/basic_inform/S-md.html
2020-03-19 00:11:25 +00:00

190 lines
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>S/prm</title>
<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="../inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>
<body>
<nav role="navigation">
<h1><a href="../webs.html">Sources</a></h1>
<ul>
<li><a href="../compiler.html">compiler</a></li>
<li><a href="../other.html">other tools</a></li>
<li><a href="../extensions.html"><b>extensions and kits</b></a></li>
<li><a href="../units.html">unit test tools</a></li>
/ul>
<h2>Extensions</h2>
<ul>
<li><a href="../basic_inform/index.html">Basic Inform</a></li>
<li><a href="../standard_rules/index.html">Standard Rules</a></li>
</ul>
<h2>Kits</h2>
<ul>
<li><a href="../BasicInformKit/index.html">BasicInformKit</a></li>
<li><a href="../BasicInformExtrasKit/index.html">BasicInformExtrasKit</a></li>
<li><a href="../CommandParserKit/index.html">CommandParserKit</a></li>
<li><a href="../EnglishLanguageKit/index.html">EnglishLanguageKit</a></li>
<li><a href="../WorldModelKit/index.html">WorldModelKit</a></li>
</ul>
</nav>
<main role="main">
<!--Weave of 'S/md' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="../extensions.html">Extensions</a></li><li><a href="index.html">basicinform 1</a></li><li><b>Miscellaneous Definitions</b></li></ul><p class="purpose">A miscellany of properties, variables, rulebooks and activities. Whereas the Standard Rules for interactive fiction are luxuriant in providing these, the Basic Inform kernel is as small as it sensibly can be, with just a few of each.</p>
<ul class="toc"><li><a href="#SP2">&#167;2. Properties</a></li><li><a href="#SP5">&#167;5. Variables</a></li><li><a href="#SP7">&#167;7. Rulebooks</a></li></ul><hr class="tocbar">
<p class="inwebparagraph"><a id="SP1"></a><b>&#167;1. </b></p>
<pre class="display">
<span class="plain">Part Two - Miscellaneous Definitions</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP2"></a><b>&#167;2. Properties. </b>The following declaration is misleading, since Inform doesn't read it
literally. "Variable initial value" is in fact the only property common
to global variables, a behind-the-scenes convenience. It's not visible
or useful in regular coding, and doesn't belong to objects.
</p>
<pre class="display">
<span class="plain">An object has a value called variable initial value.</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP3"></a><b>&#167;3. </b>Objects do, however, have a wealth of properties to do with their naming.
"Specification" is special: it isn't compiled, but holds text used to
annotate the Kinds index. "Indefinite appearance text" is also an internal
property (it holds the text sometimes given in double-quotes immediately
after an object is created).
</p>
<pre class="display">
<span class="plain">An object has a text called specification.</span>
<span class="plain">An object has a text called indefinite appearance text.</span>
<span class="plain">An object has a text called printed name.</span>
<span class="plain">An object has a text called printed plural name.</span>
<span class="plain">An object has a text called an indefinite article.</span>
<span class="plain">An object can be plural-named or singular-named. An object is usually singular-named.</span>
<span class="plain">An object can be proper-named or improper-named. An object is usually improper-named.</span>
<span class="plain">An object can be ambiguously plural.</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP4"></a><b>&#167;4. </b>In the age of Inter as a target language, "translates into I6" is not to
be taken literally. These are instead identifier names which will be used to
annotate our Inter code.
</p>
<pre class="display">
<span class="plain">The indefinite article property translates into I6 as "article".</span>
<span class="plain">The printed plural name property translates into I6 as "plural".</span>
<span class="plain">The printed name property translates into I6 as "short_name".</span>
<span class="plain">The plural-named property translates into I6 as "pluralname".</span>
<span class="plain">The ambiguously plural property translates into I6 as "ambigpluralname".</span>
<span class="plain">The proper-named property translates into I6 as "proper".</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP5"></a><b>&#167;5. Variables. </b>Most of the built-in kinds and kind constructors, such as "number" and
"list of K", are defined in special low-level files read in by Inform early
in its run &mdash; not here. "Natural language" is an exception.
</p>
<p class="inwebparagraph">"Language of play" should no longer be taken to imply play; it's really the
natural language of our output text, if any. It affects how verbs conjugate,
and what "say N in words" does, for example.
</p>
<pre class="display">
<span class="plain">A natural language is a kind of value.</span>
<span class="plain">The language of play is a natural language that varies.</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP6"></a><b>&#167;6. </b>The "parameter-object" is, as its hyphenated name suggests, an internal
implementation convenience. When a rulebook runs on a given value, it holds
that value. It is really an alias, not a fixed variable, and has whatever
kind is appropriate to the rulebook currently running. (In particular,
despite the definition below, it is not necessarily an object.)
</p>
<pre class="display">
<span class="plain">The parameter-object is an object that varies.</span>
<span class="plain">The parameter-object variable translates into I6 as "parameter_value".</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP7"></a><b>&#167;7. Rulebooks. </b>The Standard Rules (for interactive fiction) create a wealth of rulebooks
and activities in order to model a fictional world. Here we are much more
sparing: a Basic Inform project begins with a very minimal number of rules.
</p>
<p class="inwebparagraph">The startup and shutdown rulebooks, and the "starting the virtual machine"
activity, are not normally used in Basic Inform, but need to be defined here
for technical reasons.
</p>
<p class="inwebparagraph">Be wary modifying these: rulebooks and activities must be defined in exactly
the right order, matching definitions both in the Inform 7 compiler and in the
template libraries. (Remember that creating an activity creates three rulebooks.)
</p>
<pre class="display">
<span class="plain">Startup rules is a rulebook.</span>
<span class="plain">Startup rules have outcomes allow startup (success) and deny startup (failure).</span>
<span class="plain">Shutdown rules is a rulebook.</span>
<span class="plain">Starting the virtual machine (documented at act_startvm) is an activity.</span>
<span class="plain">The enable Glulx acceleration rule is listed first in for starting the virtual machine.</span>
<span class="plain">The enable Glulx acceleration rule translates into I6 as "ENABLE_GLULX_ACCEL_R".</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP8"></a><b>&#167;8. </b>However, the two activities for printing names of objects are indeed
functional in Basic Inform.
</p>
<pre class="display">
<span class="plain">Printing the name of something (documented at act_pn) is an activity.</span>
<span class="plain">The standard name printing rule is listed last in the for printing the name rulebook.</span>
<span class="plain">The standard name printing rule translates into I6 as "STANDARD_NAME_PRINTING_R".</span>
<span class="plain">Printing the plural name of something (documented at act_ppn) is an activity.</span>
<span class="plain">The standard printing the plural name rule is listed last in the for printing the plural name rulebook.</span>
<span class="plain">The standard printing the plural name rule translates into I6 as "STANDARD_PLURAL_NAME_PRINTING_R".</span>
</pre>
<p class="inwebparagraph"></p>
<hr class="tocbar">
<ul class="toc"><li><a href="S-prm.html">Back to 'Preamble'</a></li><li><a href="S-pd.html">Continue with 'Phrase Definitions'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>
</html>