X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=informqr%2Finformqr.md;h=6043d8d6c399592da856d6db01d92ecec23f575b;hb=773e2dd9d1f2150d4341b0f93774e6444507cacc;hp=fa5f2f26cd5e9f43cd6533d54a6e56a35f79a26d;hpb=cc7b3641d6c35a66e3d9a6b0b7c0cd43e8ef7517;p=inform-resources.git diff --git a/informqr/informqr.md b/informqr/informqr.md index fa5f2f2..6043d8d 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -348,7 +348,7 @@ A routine **embedded** as the value of an object property: statement; ] -Routines return a single value, when execution reaches the final "\]" +Routines return a single value, when execution reaches the final "]" or an explicit return statement: return expr; @@ -582,8 +582,8 @@ current routine: Other useful directives ----------------------- -To include a directive within a routine definition \[...\], insert a -hash "\#" as its first character. +To include a directive within a routine definition [...], insert a +hash "#" as its first character. To conditionally compile: @@ -629,4 +629,51 @@ To declare a new attribute common to all objects: To declare a new property common to all objects: Property property; - Property property expr; \ No newline at end of file + Property property expr; + +Uncommon and deprecated directives +---------------------------------- + +You're unlikely to need these; look them up if necessary. + + Abbreviate "string " "string " ... "string "; + End; + Import variable variable ... variable; + Link "compiled_file"; + Switches list_of_compiler_switches; + System_file; + +File structure +-------------- + +A minimal source file: + + Constant Story "MYGAME"; + Constant Headline "^My first Inform game.^"; + Constant MANUAL_PRONOUNS; + + Include "Parser"; + Include "VerbLib"; + + [ Initialise; location = study; "^Hello!^"; ]; + + Class Room + with description "A bare room." + has light; + + Class Furniture + with before [; Take,Pull,Push,Pushdir: + print_ret (The) self, + " is too heavy for that."; ] + has static supporter; + + Room study "Your study'; + + Furniture "writing desk" study + with name 'writing' 'desk' 'table'; + + Object -> -> axe "rusty axe" + with name 'rusty' 'blunt' 'axe' 'hatchet' + description "It seems old and blunt."; + + Include "Grammar"; \ No newline at end of file