1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-26 04:00:43 +03:00

Expanded extension documentation

This commit is contained in:
Graham Nelson 2024-04-13 14:05:47 +01:00
parent 0726b2cbf1
commit 2fa1defd6d
21 changed files with 1792 additions and 255 deletions

View file

@ -1,6 +1,6 @@
# Inform 7
[Version](notes/versioning.md): 10.2.0-beta+6X42 'Krypton' (8 April 2024)
[Version](notes/versioning.md): 10.2.0-beta+6X43 'Krypton' (13 April 2024)
## About Inform

View file

@ -1,3 +1,3 @@
Prerelease: beta
Build Date: 8 April 2024
Build Number: 6X42
Build Date: 13 April 2024
Build Number: 6X43

View file

@ -181,7 +181,7 @@ number of successes.
</li></ul>
<pre class="undisplayed-code all-displayed-code code-font">
<span class="plain-syntax">Size of lexicon: 3169 excerpt meanings</span>
<span class="plain-syntax"> Stored among 859 words out of total vocabulary of 10633</span>
<span class="plain-syntax"> Stored among 859 words out of total vocabulary of 10637</span>
<span class="plain-syntax"> 723 words have a start list: longest belongs to report (with 293 meanings)</span>
<span class="plain-syntax"> 21 words have an end list: longest belongs to digits (with 7 meanings)</span>
<span class="plain-syntax"> 29 words have a middle list: longest belongs to to (with 4 meanings)</span>

View file

@ -266,6 +266,8 @@ and the second and third pieces used as headings and subheadings respectively.
<span class="plain-syntax"> </span><span class="identifier-syntax">HW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">3</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">HW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">HW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="6-pi.html#SP1_2">&#167;1.2</a>.</li></ul>
@ -331,7 +333,10 @@ above, it may as well go here.
<span class="plain-syntax"> </span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">show_if_unhyphenated</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span><span class="plain-syntax">: </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%+W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span><span class="plain-syntax">: {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">C</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%+W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">C</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax">: {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">C</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;heading-name-hyphenated&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%+W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">C</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>

View file

@ -1,5 +1,5 @@
Size of lexicon: 3169 excerpt meanings
Stored among 859 words out of total vocabulary of 10633
Stored among 859 words out of total vocabulary of 10637
723 words have a start list: longest belongs to report (with 293 meanings)
21 words have an end list: longest belongs to digits (with 7 meanings)
29 words have a middle list: longest belongs to to (with 4 meanings)

View file

@ -392,3 +392,4 @@ USAGE: ph_markfileready 0 0 0
USAGE: ph_markfilenotready 0 0 0
USAGE: phs_extcredits 0 0 0
USAGE: phs_compextcredits 0 0 0
USAGE: ph_issuertp 0 0 0

View file

@ -1,6 +1,6 @@
Total memory consumption was 139941K = 137 MB
Total memory consumption was 139942K = 137 MB
---- was used for 2134752 objects, in 375915 frames in 0 x 800K = 0K = 0 MB:
---- was used for 2134754 objects, in 375917 frames in 0 x 800K = 0K = 0 MB:
30.1% inter_tree_node_array 60 x 8192 = 491520 objects, 43255680 bytes
19.4% text_stream_array 4952 x 100 = 495200 objects, 27889664 bytes
@ -52,7 +52,7 @@ Total memory consumption was 139941K = 137 MB
---- markdown_item_array 1 x 1000 objects, 136032 bytes
---- inference 1708 objects, 122976 bytes
---- pcalc_term_array 3 x 1000 = 3000 objects, 120096 bytes
---- documentation_ref 1281 objects, 112728 bytes
---- documentation_ref 1283 objects, 112904 bytes
---- inter_schema 1546 objects, 111312 bytes
---- imperative_defn 1419 objects, 102168 bytes
---- noun_usage 2421 objects, 96840 bytes
@ -262,9 +262,9 @@ Total memory consumption was 139941K = 137 MB
---- loop_over_scope 1 object, 40 bytes
---- i6_memory_setting 1 object, 32 bytes
99.9% was used for memory not allocated for objects:
100.0% was used for memory not allocated for objects:
62.4% text stream storage 89500432 bytes in 515314 claims
62.4% text stream storage 89500764 bytes in 515316 claims
3.8% dictionary storage 5505088 bytes in 7779 claims
---- sorting 2624 bytes in 531 claims
5.0% source text 7200000 bytes in 3 claims
@ -282,5 +282,5 @@ Total memory consumption was 139941K = 137 MB
---- code generation workspace for objects 3536 bytes in 19 claims
0.2% emitter array storage 290048 bytes in 2074 claims
-136.-7% was overhead - -195996104 bytes = -191402K = -186 MB
-136.-7% was overhead - -195996280 bytes = -191402K = -186 MB

View file

@ -1,27 +1,28 @@
100.0% in inform7 run
68.7% in compilation to Inter
46.8% in //Sequence::undertake_queued_tasks//
4.4% in //MajorNodes::pre_pass//
3.7% in //MajorNodes::pass_1//
1.8% in //ImperativeDefinitions::assess_all//
1.4% in //RTKindConstructors::compile//
1.4% in //RTPhrasebook::compile_entries//
67.5% in compilation to Inter
46.3% in //Sequence::undertake_queued_tasks//
4.2% in //MajorNodes::pre_pass//
3.4% in //MajorNodes::pass_1//
1.9% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
1.5% in //RTPhrasebook::compile_entries//
1.1% in //Sequence::lint_inter//
0.7% in //ImperativeDefinitions::compile_first_block//
0.3% in //CompletionModule::compile//
0.3% in //ImperativeDefinitions::compile_first_block//
0.3% in //MajorNodes::pass_2//
0.3% in //Sequence::undertake_queued_tasks//
0.3% in //Sequence::undertake_queued_tasks//
0.3% in //World::stage_V//
5.2% not specifically accounted for
27.1% in running Inter pipeline
8.5% in step 14/15: generate inform6 -> auto.inf
7.0% in step 5/15: load-binary-kits
5.9% in step 6/15: make-synoptic-module
1.8% in step 9/15: make-identifiers-unique
5.0% not specifically accounted for
27.4% in running Inter pipeline
8.8% in step 14/15: generate inform6 -> auto.inf
6.9% in step 5/15: load-binary-kits
5.7% in step 6/15: make-synoptic-module
1.9% in step 9/15: make-identifiers-unique
0.3% in step 12/15: eliminate-redundant-operations
0.3% in step 4/15: compile-splats
0.3% in step 7/15: shorten-wiring
0.3% in step 8/15: detect-indirect-calls
2.2% not specifically accounted for
4.0% in supervisor
2.4% not specifically accounted for
3.8% in supervisor
1.2% not specifically accounted for

View file

@ -63,9 +63,11 @@
--md-background-colour: #e3e6ea;
--md-transcript-background-colour: #f9e9e9;
--md-code-background-colour: #e9e9f9;
--md-dashed-border-colour: #2f6fab;
--md-extract-inform7-box-colour: #FFFDE0;
--md-extract-problem-box-colour: #e9f9e9;
--md-extract-code-box-colour: #e9f9e9;
--md-shaded-box-colour: #e9e9e9;
--md-transcript-deletion-colour: #ff0000;
--md-transcript-insertion-colour: #00ff00;
@ -181,9 +183,11 @@
--md-background-colour: #090b0d;
--md-transcript-background-colour: #091919;
--md-code-background-colour: #191909;
--md-dashed-border-colour: #CfAf32;
--md-extract-inform7-box-colour: #123456;
--md-extract-problem-box-colour: #1f111f;
--md-extract-code-box-colour: #1f111f;
--md-shaded-box-colour: #111111;
--md-transcript-deletion-colour: #ffdddd;
--md-transcript-insertion-colour: #ddffdd;
@ -734,7 +738,7 @@ button.dangerousbutton {
.markdowncontent code.inlinecode {
font-size: 90%;
font-family: var(--informcode-fontfamily);
background-color: var(--md-background-colour);
background-color: var(--md-code-background-colour);
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-top-left-radius: 6px;
@ -754,6 +758,12 @@ button.dangerousbutton {
border: 1px dotted var(--md-dashed-border-colour);
background-color: var(--md-transcript-background-colour);
}
.markdowncontent div.extract-code {
margin: 0.75em;
padding: 0.75em;
border: 1px dotted var(--md-dashed-border-colour);
background-color: var(--md-code-background-colour);
}
.markdowncontent div.extract-problems {
margin: 0.75em;

View file

@ -264,14 +264,15 @@ release_solution _ WI_26_16 "26.16" "26.16. Walkthrough solutions"
release_card release_source _ WI_26_17 "26.17" "26.17. Releasing the source text"
PM_MapPlacementDirection PM_MapPlacement PM_MapDirectionClue PM_MapHintUnknown PM_MapSettingTypeFailed PM_MapSettingTooLong PM_MapSettingUnknown PM_MapSettingOfUnknown PM_MapBadRubric PM_MapUnknownOffsetBase PM_MapUnknownOffset PM_MapUnknownColour PM_MapNonLateral PM_MapToNonRoom PM_MapFromNonRoom MAPHINTS _ WI_26_18 "26.18" "26.18. Improving the index map"
EPSMAP _ WI_26_19 "26.19" "26.19. Producing an EPS format map"
EXTENSIONS _ WI_28_1 "28.1" "28.1. The status of extensions"
SRULES _ WI_28_2 "28.2" "28.2. The Standard Rules"
PM_ExtNoEndsHere PM_ExtNoBeginsHere PM_ExtMultipleEndsHere PM_ExtBeginsAfterEndsHere PM_ExtMultipleBeginsHere _ WI_28_5 "28.5" "28.5. A simple example extension"
PM_ExtVersionTooLow phs_extcredits phs_compextcredits _ WI_28_6 "28.6" "28.6. Version numbering"
PM_UnequalHeadingInPlaceOf PM_HeadingInPlaceOfUnknown PM_HeadingInPlaceOfUnincluded _ WI_28_9 "28.9" "28.9. Extensions can interact with other extensions"
PM_BadInlineTag PM_BadInlineExpansion PM_InlineRule PM_InlineTooLong PM_UnendingI6 _ WI_28_14 "28.14" "28.14. Defining phrases in Inform 6"
PM_BadObjectTranslation _ WI_28_20 "28.20" "28.20. Inform 6 objects and classes"
PM_QuantityTranslatedAlready PM_NonQuantityTranslated PM_NonPropertyTranslated PM_TranslatedToNonIdentifier PM_TranslatedUnknownCategory PM_TranslatedTwice PM_TranslatesActionAlready PM_TranslatesNonAction _ WI_28_21 "28.21" "28.21. Inform 6 variables, properties, actions, and attributes"
PM_GrammarTranslatedAlready _ WI_28_22 "28.22" "28.22. Inform 6 Understand tokens"
PM_IncludeInsteadOf PM_WhenDefiningUnknown PM_BeforeTheLibrary PM_BadI6Inclusion _ WI_28_24 "28.24" "28.24. Overriding definitions in kits"
PM_LabelNamespaceTooLong _ WI_28_27 "28.27" "28.27. Invocation labels, counters and storage"
SRULES EXTENSIONS _ WI_28_2 "28.2" "28.2. Review of how extensions are used"
PM_ExtNoEndsHere PM_ExtNoBeginsHere PM_ExtMultipleEndsHere PM_ExtBeginsAfterEndsHere PM_ExtMultipleBeginsHere _ WI_28_6 "28.6" "28.6. Begins here and ends here"
PM_ExtVersionTooLow _ WI_28_7 "28.7" "28.7. Version numbering"
phs_extcredits phs_compextcredits _ WI_28_10 "28.10" "28.10. Licence"
PM_UnequalHeadingInPlaceOf PM_HeadingInPlaceOfUnknown PM_HeadingInPlaceOfUnincluded _ WI_28_12 "28.12" "28.12. Extensions which vary with use"
ph_issuertp _ WI_28_15 "28.15" "28.15. Run-time problems"
PM_BadInlineTag PM_BadInlineExpansion PM_InlineRule PM_InlineTooLong PM_UnendingI6 _ WI_30_2 "30.2" "30.2. Defining phrases in Inform 6"
PM_BadObjectTranslation _ WI_30_8 "30.8" "30.8. Inform 6 objects and classes"
PM_QuantityTranslatedAlready PM_NonQuantityTranslated PM_NonPropertyTranslated PM_TranslatedToNonIdentifier PM_TranslatedUnknownCategory PM_TranslatedTwice PM_TranslatesActionAlready PM_TranslatesNonAction _ WI_30_9 "30.9" "30.9. Inform 6 variables, properties, actions, and attributes"
PM_GrammarTranslatedAlready _ WI_30_10 "30.10" "30.10. Inform 6 Understand tokens"
PM_IncludeInsteadOf PM_WhenDefiningUnknown PM_BeforeTheLibrary PM_BadI6Inclusion _ WI_30_12 "30.12" "30.12. Overriding definitions in kits"
PM_LabelNamespaceTooLong _ WI_30_15 "30.15" "30.15. Invocation labels, counters and storage"

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture16Kit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"compatibility": "16-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture32Kit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"compatibility": "32-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "BasicInformKit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "CommandParserKit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "EnglishLanguageKit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "WorldModelKit",
"version": "10.2.0-beta+6X42"
"version": "10.2.0-beta+6X43"
},
"needs": [ {
"need": {

View file

@ -0,0 +1,7 @@
Name: "code"
Details: "For quoting generic code samples."
Extension: ".txt"
colouring {
=> !identifier
}

View file

@ -164,6 +164,8 @@ and the second and third pieces used as headings and subheadings respectively.
HW = GET_RW(<heading-name-hyphenated>, 3);
} else if (<<r>> == 2) {
HW = GET_RW(<heading-name-hyphenated>, 2);
} else if (<<r>> == 1) {
HW = GET_RW(<heading-name-hyphenated>, 1);
}
@ We see where |idb| is in a run of phrases which share a common documentation
@ -221,7 +223,10 @@ void RTPhrasebook::index_definition_area(OUTPUT_STREAM, wording W, int show_if_u
<heading-name-hyphenated>(W);
if ((<<r>> == 1) && (show_if_unhyphenated == FALSE)) return;
switch (<<r>>) {
case 1: WRITE("%+W", W); break;
case 1: {
wording C = GET_RW(<heading-name-hyphenated>, 1);
WRITE("%+W", C); break;
}
case 2: {
wording C = GET_RW(<heading-name-hyphenated>, 2);
WRITE("%+W", C); break;

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View file

@ -1,5 +1,5 @@
Size of lexicon: 3169 excerpt meanings
Stored among 859 words out of total vocabulary of 10633
Stored among 859 words out of total vocabulary of 10637
723 words have a start list: longest belongs to report (with 293 meanings)
21 words have an end list: longest belongs to digits (with 7 meanings)
29 words have a middle list: longest belongs to to (with 4 meanings)