X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=informqr%2Finformqr.md;h=40a9fadb490523c262f647afef6d9aaa6b836287;hb=582be378714b41937fb2cc99c4d6f8e96c76a910;hp=c43d0c4e1e58877454b3d45b1302fb1cb31086c2;hpb=92cfa50b5bb99a38f735143485e1cc9588930a39;p=inform-resources.git diff --git a/informqr/informqr.md b/informqr/informqr.md index c43d0c4..40a9fad 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -79,10 +79,10 @@ list of alternatives *q1* `or` *q2* `or` ... *qN*: ---------------- ---------------------------------------- *p == q* *p* is equal to *q* *p ~= q* *p* isn't equal to *q* - *p* > *q* *p* is greater than *q* - *p < q* *p* is less than *q* - *p >= q* *p* is greater than or equal to *q* - *p <= q* *p* is less than or equal to *q* + *p* > *q* *p* is greater than *q* + *p < q* *p* is less than *q* + *p >= q* *p* is greater than or equal to *q* + *p <= q* *p* is less than or equal to *q* *p ofclass q* object *p* is of class *q* *p in q* object *p* is a child of object *q* *p notin q* object *p* isn't a child of object *q* @@ -148,22 +148,22 @@ A **word array** is a set of global words accessed using `array-->0`, Array array --> "string"; A **table array** is a set of global words accessed using -*array-->1*, *array-->2*, ... *array-->N*, with -*array-->0* initialized to *N*: +*array-->1*, *array-->2*, ... *array-->N*, with +*array-->0* initialized to *N*: Array array table N ; Array array table expr1 expr2 ... exprN Array array table "string"; A **byte array** is a set of global bytes accessed using -*array->0*, *array->1*, ... *array->(N-1)*: +*array->0*, *array->1*, ... *array->(N-1)*: Array array -> N; Array array -> expr1 expr2 ... exprN; Array array -> "string"; A **string array** is a set of global bytes accessed using -*array->1*, *array->2*, ... *array->N*, with *array->0* +*array->1*, *array->2*, ... *array->N*, with *array->0* initialized to *N*: Array array string N; @@ -424,4 +424,100 @@ To jump out of the current innermost loop or switch: To immediately start the next iteration of the current loop: - continue; \ No newline at end of file + continue; + +Displaying information +---------------------- + +To output a list of values: + + print value,value, ... value; + +To output a list of values followed by a newline, then return `true` +from the current routine: + + print_ret value,value, ... value; + +If the first (or only) *value* is a string, "`print_ret`" can be +omitted: + + "string",value, ... value ; + +Each *value* can be an expression, a string or a rule. + +An **expression** is output as a signed decimal value. + +A **string** in quotes "..." is output as text. + +A **rule** is one of: + + -------------------- ------------------------------------------------ + `(number)` *expr* the *expr* in words + `(char)` *expr* the *expr* as a single character + `(string)` *addr* the string at the *addr* + `(address)` *addr* the dictionary word at the *addr* + `(name)` *object* the external (short) name of the object + `(a)` *object* the short name preceded by "a/an" + `(the)` *object* the short name preceded by "the" + `(The)` *object* the short name preceded by "The" + `(routine)` value the output when calling `routine(value)` + -------------------- ------------------------------------------------ + +To output a newline character: + + new_line; + +To output multiple spaces: + + spaces expr; + +To output text in a display box: + + box "string " "string " ... "string "; + +To change from regular to fixed-pitch font: + + font off; + ... + font on; + +To change the font attributes: + + style bold; ! use one or more of these + style underline ; ! + style reverse ; ! + ... + style roman; + +Uncommon and deprecated statements +---------------------------------- + +To jump to a labelled statement: + + jump label; + ... + .label; statement; + +To terminate the program: + + quit + +To save and restore the program state: + + save label; + ... + restore label; + +To output the Inform compiler version number: + +inversion; + +To accept data from the current input stream: + + read text_array parse_array routine; + +To assign to one of 32 'low string' variables: + + string N "string"; + Lowstring string_var "string"; + string N string_var; \ No newline at end of file