1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 16:44:21 +03:00
inform7/indoc/Tests/Targets/osx_app-Ideal/Sdoc1.html
2019-02-05 00:44:07 +00:00

407 lines
23 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="indoc_SV.css" rel="stylesheet" type="text/css">
<!--Generated by indoc on 28 Apr 2016-->
<title>1.1. Preface</title>
<script type="text/javascript">
function showExtra(id, imid) {
if (document.getElementById(id).style.display == 'block') {
document.getElementById(id).style.display = 'none';
document.getElementById(imid).src = 'inform:/doc_images/extra.png';
} else {
document.getElementById(id).style.display = 'block';
document.getElementById(imid).src = 'inform:/doc_images/extraclose.png';
}
}
function onLoaded() {
if (window.location.hash) {
var hash = window.location.hash.substring(2);
if (hash.search("_") >= 0) {
var res = hash.split("_");
showExample("example"+res[1]);
} else {
showExample("example"+hash);
}
}
}
window.onload=onLoaded;
function showExample(id) {
if (document.getElementById(id).style.display == 'block') {
document.getElementById(id).style.display = 'none';
} else {
document.getElementById(id).style.display = 'block';
}
}
function openExtra(id, imid) {
document.getElementById(id).style.display = 'block';
document.getElementById(imid).src = 'inform:/doc_images/extraclose.png';
}
function closeExtra(id, imid) {
document.getElementById(id).style.display = 'none';
document.getElementById(imid).src = 'inform:/doc_images/extra.png';
}
</script>
</head>
<body class="paper papertint">
<script type="text/javascript">
function pasteCode(code) {
var myProject = window.Project;
myProject.selectView('source');
myProject.pasteCode(code);
}
</script>
<script type="text/javascript">
function createNewProject(code, title) {
var myProject = window.Project;
myProject.createNewProject(title, code);
}
</script>
<!--SEARCH TITLE "Preface"-->
<!--SEARCH SECTION "1.1"-->
<!--SEARCH SORT "001-001-001-000"-->
<div class="bookheader">
<table class="fullwidth midnightblack">
<tr>
<td class="midnightbannerleftcell">
</td>
<td class="midnightbannercentrecell">
<a href="index.html" class="standardlink"><span class="midnightbannertext">Chapter 1: Introduction</span></a>
</td>
<td class="midnightbannerrightcell">
<a href="index.html" class="standardlink"><img alt="Hookup.png" src="inform:/doc_images/Hookup.png" id="hookup"></a><a href="Sdoc2.html" class="standardlink"><img alt="Hookright.png" src="inform:/doc_images/Hookright.png" id="hookright"></a>
</td>
</tr>
</table>
</div>
<p class="sectionheading">§1.1. Preface</p>
<p>Nothing to see here.</p>
<hr>
<div class="bookexamples">
<p class="chapterheading"></p>
<!--START EXAMPLE "1: The Über-complète Absolute Truth" "e0"-->
<a id="e0"></a><table class="egcue">
<tr>
<td class="egcellforoval">
<div class="egovalfornumber overstruckimage">
<a href="#" class="eglink" onclick="showExample('example0'); return false;"><b>1</b></a></div>
</td>
<td class="egnamecell">
<p class="egcuetext"><a href="#" class="eglink" onclick="showExample('example0'); return false;"><img class="asterisk" alt="*" src="inform:/doc_images/asterisk.png" /><b><span class="egbanner">Example</span><span class="egname">The Über-complète Absolute Truth</span></b></a><br>
An explanation of the examples in this documentation, and the asterisks attached to them. Click the heading of the example, or the example number, to reveal the text.</p>
</td>
<td class="egcrossref">
<!--START IGNORE-->
<div class="egovalforxref overstruckimage">
<a href="doc1.html#e0"><i>WI</i></a></div>
<!--END IGNORE-->
</td>
</tr>
</table>
<div class="egpanel" id="example0" style="display: none;">
<p>This is the first of about 400 numbered examples. In a few cases, such as this one, they provide a little background information, but almost all demonstrate Inform source text. The techniques demonstrated tend to be included either because they are frequently asked for, or because they show how to achieve some interesting effect.</p>
<p>In most cases, typing the single command TEST ME will play through a few moves to show off the effect being demonstrated. (You may find it convenient to create a &quot;scratch&quot; project file for temporary trials like this, clearing all its text and starting again with each new test.)</p>
<p>As part of the testing process which verifies a new build of Inform, each example in turn is extracted from this documentation, translated, played through, and the resulting transcript mechanically checked. So the examples may even work as claimed. But the flesh is weak, and there are bound to be glitches. We would welcome reports, so that future editions can be corrected.</p>
<p>Each example is loosely graded by difficulty: if they were exercises in a textbook, the asterisks would indicate how many marks each question scores. As a general rule:</p>
<!--START CODE "c21_0"-->
<blockquote class="code"><p class="quoted"><a id="c21_0"></a><img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> - A simple example, fairly easily guessed.
<br>
<img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> - A complicated or surprising example.
<br>
<img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> - An example needing detailed knowledge of many aspects of the system.
<br>
<img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> <img alt="asterisk.png" src="inform:/doc_images/asterisk.png" /> - A complete scenario, containing material not necessarily relevant to the topic being demonstrated.
</p>
</blockquote>
<!--END CODE-->
<p>In general, the main text of <span class="italic">Writing with Inform</span> tries never to assume knowledge of material which has not yet appeared, but the trickier examples almost always need to break this rule.</p>
<p>The same examples are included in <span class="boldface">both</span> of the books of documentation, but in a different order: in <span class="italic">Writing with Inform</span>, they appear near the techniques used to make them work; in <span class="italic">The Inform Recipe Book</span>, they are grouped by the effects they provide. For instance, an example called &quot;Do Pass Go&quot;, about the throwing of a pair of dice, appears in the &quot;Randomness&quot; section of <span class="italic">Writing with Inform</span> and also in the &quot;Dice and Playing Cards&quot; section of <span class="italic">The Inform Recipe Book</span>. Clicking the italicised WI and RB buttons at the right-hand side of an example's heading switches between its position in each book.</p>
<!--START CODE "c22_0"-->
<blockquote class="code"><p class="quoted"><a id="c22_0"></a><a href="javascript:pasteCode('[=0x0022=]The Über-complète Absolute Truth[=0x0022=][=0x000A=][=0x000A=]The Minivan is a room. The Open Road is outside from the Minivan. Pete is a man in the Minivan. [=0x0022=]Pete [if the player has been in the Minivan for 3 turns]is starting to look bored[otherwise]is playing with his travel activity book[end if].[=0x0022=][=0x000A=][=0x000A=]Every turn:[=0x000A=][=0x0009=]if the player has been in the Minivan for 5 turns, say [=0x0022=][=0x0027=]Are we there [if saying no]now?[=0x0027=][otherwise]yet?[=0x0027=] asks Pete.[end if][=0x0022=][=0x000A=][=0x000A=]Instead of saying no:[=0x000A=][=0x0009=]say [=0x0022=][=0x0027=]Oh,[=0x0027=] says Pete. There is a blessed, momentary silence.[=0x0022=][=0x000A=][=0x000A=]Table of Value Names[=0x000A=]term[=0x0009=]value[=0x0009=]topic[=0x000A=][=0x0022=]ace[=0x0022=][=0x0009=][=0x0022=]1[=0x0022=][=0x0009=][=0x0022=]ace/A/one[=0x0022=][=0x000A=][=0x0022=]deuce[=0x0022=][=0x0009=][=0x0022=]2[=0x0022=][=0x0009=][=0x0022=]deuce/two[=0x0022=][=0x000A=][=0x0022=]three[=0x0022=][=0x0009=][=0x0022=]3[=0x0022=][=0x0009=][=0x0022=]three[=0x0022=][=0x000A=][=0x0022=]four[=0x0022=][=0x0009=][=0x0022=]4[=0x0022=][=0x0009=][=0x0022=]four[=0x0022=][=0x000A=][=0x0022=]five[=0x0022=][=0x0009=][=0x0022=]5[=0x0022=][=0x0009=][=0x0022=]five[=0x0022=][=0x000A=][=0x0022=]six[=0x0022=][=0x0009=][=0x0022=]6[=0x0022=][=0x0009=][=0x0022=]six[=0x0022=][=0x000A=][=0x0022=]seven[=0x0022=][=0x0009=][=0x0022=]7[=0x0022=][=0x0009=][=0x0022=]seven[=0x0022=][=0x000A=][=0x0022=]eight[=0x0022=][=0x0009=][=0x0022=]8[=0x0022=][=0x0009=][=0x0022=]eight[=0x0022=][=0x000A=][=0x0022=]nine[=0x0022=][=0x0009=][=0x0022=]9[=0x0022=][=0x0009=][=0x0022=]nine[=0x0022=][=0x000A=][=0x0022=]ten[=0x0022=][=0x0009=][=0x0022=]10[=0x0022=][=0x0009=][=0x0022=]ten[=0x0022=][=0x000A=][=0x0022=]jack[=0x0022=][=0x0009=][=0x0022=]11[=0x0022=][=0x0009=][=0x0022=]jack/knave/J[=0x0022=][=0x000A=][=0x0022=]queen[=0x0022=][=0x0009=][=0x0022=]12[=0x0022=][=0x0009=][=0x0022=]queen/Q[=0x0022=][=0x000A=][=0x0022=]king[=0x0022=][=0x0009=][=0x0022=]13[=0x0022=][=0x0009=][=0x0022=]king/K[=0x0022=][=0x000A=][=0x000A=]Instead of going to the Open Road:[=0x000A=][=0x0009=]say [=0x0022=]You leap to your death.[=0x0022=];[=0x000A=][=0x0009=]end the story.[=0x000A=][=0x000A=]Test me with [=0x0022=]z / z / look / g / g / g / no / z / z / z / no / z / out[=0x0022=].[=0x000A=][=0x000A=][And indeed][=0x000A=][=0x000A=]The example continues here.[=0x000A=][=0x000A=]And goes on.[=0x000A=][=0x000A=]\n')"><img alt="paste@2x.png" src="inform:/doc_images/paste@2x.png" width="13" height="13"></a> <a href="javascript:createNewProject('[=0x0022=]The Über-complète Absolute Truth[=0x0022=][=0x000A=][=0x000A=]The Minivan is a room. The Open Road is outside from the Minivan. Pete is a man in the Minivan. [=0x0022=]Pete [if the player has been in the Minivan for 3 turns]is starting to look bored[otherwise]is playing with his travel activity book[end if].[=0x0022=][=0x000A=][=0x000A=]Every turn:[=0x000A=][=0x0009=]if the player has been in the Minivan for 5 turns, say [=0x0022=][=0x0027=]Are we there [if saying no]now?[=0x0027=][otherwise]yet?[=0x0027=] asks Pete.[end if][=0x0022=][=0x000A=][=0x000A=]Instead of saying no:[=0x000A=][=0x0009=]say [=0x0022=][=0x0027=]Oh,[=0x0027=] says Pete. There is a blessed, momentary silence.[=0x0022=][=0x000A=][=0x000A=]Table of Value Names[=0x000A=]term[=0x0009=]value[=0x0009=]topic[=0x000A=][=0x0022=]ace[=0x0022=][=0x0009=][=0x0022=]1[=0x0022=][=0x0009=][=0x0022=]ace/A/one[=0x0022=][=0x000A=][=0x0022=]deuce[=0x0022=][=0x0009=][=0x0022=]2[=0x0022=][=0x0009=][=0x0022=]deuce/two[=0x0022=][=0x000A=][=0x0022=]three[=0x0022=][=0x0009=][=0x0022=]3[=0x0022=][=0x0009=][=0x0022=]three[=0x0022=][=0x000A=][=0x0022=]four[=0x0022=][=0x0009=][=0x0022=]4[=0x0022=][=0x0009=][=0x0022=]four[=0x0022=][=0x000A=][=0x0022=]five[=0x0022=][=0x0009=][=0x0022=]5[=0x0022=][=0x0009=][=0x0022=]five[=0x0022=][=0x000A=][=0x0022=]six[=0x0022=][=0x0009=][=0x0022=]6[=0x0022=][=0x0009=][=0x0022=]six[=0x0022=][=0x000A=][=0x0022=]seven[=0x0022=][=0x0009=][=0x0022=]7[=0x0022=][=0x0009=][=0x0022=]seven[=0x0022=][=0x000A=][=0x0022=]eight[=0x0022=][=0x0009=][=0x0022=]8[=0x0022=][=0x0009=][=0x0022=]eight[=0x0022=][=0x000A=][=0x0022=]nine[=0x0022=][=0x0009=][=0x0022=]9[=0x0022=][=0x0009=][=0x0022=]nine[=0x0022=][=0x000A=][=0x0022=]ten[=0x0022=][=0x0009=][=0x0022=]10[=0x0022=][=0x0009=][=0x0022=]ten[=0x0022=][=0x000A=][=0x0022=]jack[=0x0022=][=0x0009=][=0x0022=]11[=0x0022=][=0x0009=][=0x0022=]jack/knave/J[=0x0022=][=0x000A=][=0x0022=]queen[=0x0022=][=0x0009=][=0x0022=]12[=0x0022=][=0x0009=][=0x0022=]queen/Q[=0x0022=][=0x000A=][=0x0022=]king[=0x0022=][=0x0009=][=0x0022=]13[=0x0022=][=0x0009=][=0x0022=]king/K[=0x0022=][=0x000A=][=0x000A=]Instead of going to the Open Road:[=0x000A=][=0x0009=]say [=0x0022=]You leap to your death.[=0x0022=];[=0x000A=][=0x0009=]end the story.[=0x000A=][=0x000A=]Test me with [=0x0022=]z / z / look / g / g / g / no / z / z / z / no / z / out[=0x0022=].[=0x000A=][=0x000A=][And indeed][=0x000A=][=0x000A=]The example continues here.[=0x000A=][=0x000A=]And goes on.[=0x000A=][=0x000A=]\n', 'Example - The Über-complète Absolute Truth')"><img alt="create@2x.png" src="inform:/doc_images/create@2x.png" width="26" height="13"></a>&nbsp;&nbsp; &quot;The Über-complète Absolute Truth&quot;
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c23_0"-->
<blockquote class="code"><p class="quoted"><a id="c23_0"></a>The Minivan is a room. The Open Road is outside from the Minivan. Pete is a man in the Minivan. &quot;Pete [if the player has been in the Minivan for 3 turns]is starting to look bored[otherwise]is playing with his travel activity book[end if].&quot;
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c24_0"-->
<blockquote class="code"><p class="quoted"><a id="c24_0"></a>Every turn:
<br>
&#160;&#160;&#160;&#160;if the player has been in the Minivan for 5 turns, say &quot;'Are we there [if saying no]now?'[otherwise]yet?' asks Pete.[end if]&quot;
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c25_0"-->
<blockquote class="code"><p class="quoted"><a id="c25_0"></a>Instead of saying no:
<br>
&#160;&#160;&#160;&#160;say &quot;'Oh,' says Pete. There is a blessed, momentary silence.&quot;
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c26_0"-->
<blockquote class="code"><p class="quoted"><a id="c26_0"></a>Table of Value Names
<br>
</p>
</blockquote>
<table class="codetable">
<tr>
<td class="quotedtablecell">
<p class="quoted">term</p>
</td>
<td class="quotedtablecell">
<p class="quoted">value</p>
</td>
<td class="quotedtablecell">
<p class="quoted">topic</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;ace&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;1&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;ace/A/one&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;deuce&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;2&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;deuce/two&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;three&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;3&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;three&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;four&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;4&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;four&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;five&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;5&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;five&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;six&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;6&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;six&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;seven&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;7&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;seven&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;eight&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;8&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;eight&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;nine&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;9&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;nine&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;ten&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;10&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;ten&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;jack&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;11&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;jack/knave/J&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;queen&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;12&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;queen/Q&quot;</p>
</td>
</tr>
<tr>
<td class="quotedtablecell">
<p class="quoted">&quot;king&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;13&quot;</p>
</td>
<td class="quotedtablecell">
<p class="quoted">&quot;king/K&quot;</p>
</td>
</tr>
</table>
<blockquote><p></p>
</blockquote>
<!--END CODE-->
<!--START CODE "c27_0"-->
<blockquote class="code"><p class="quoted"><a id="c27_0"></a>Instead of going to the Open Road:
<br>
&#160;&#160;&#160;&#160;say &quot;You leap to your death.&quot;;
<br>
&#160;&#160;&#160;&#160;end the story.
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c28_0"-->
<blockquote class="code"><p class="quoted"><a id="c28_0"></a>Test me with &quot;z / z / look / g / g / g / no / z / z / z / no / z / out&quot;.
</p>
</blockquote>
<!--END CODE-->
<p>And indeed</p>
<!--START CODE "c29_0"-->
<blockquote class="code"><p class="quoted"><a id="c29_0"></a>The example continues here.
</p>
</blockquote>
<!--END CODE-->
<!--START CODE "c30_0"-->
<blockquote class="code"><p class="quoted"><a id="c30_0"></a>And goes on.
</p>
</blockquote>
<!--END CODE-->
</div>
<p></p>
<!--END EXAMPLE-->
<hr>
</div>
<!--START IGNORE-->
<div class="bookfooter">
<table class="fullwidth">
<tr>
<td class="footerprevious">
</td>
<td class="footercontents">
<a href="index.html" class="footerlink">Contents</a>
</td>
<td class="footernext">
<a href="Sdoc2.html" class="footerlink">Next</a>
</td>
</tr>
</table>
</div>
<!--END IGNORE-->
</body>
</html>