From: Jason Self Date: Sun, 2 Jun 2019 16:10:38 +0000 (-0700) Subject: Add Displaying information X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=94a6bf5c574208fd73823861ef2c3878c7ef05e4;p=inform-resources.git Add Displaying information --- diff --git a/informqr/informqr.md b/informqr/informqr.md index c43d0c4..fd3ab8b 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -424,4 +424,67 @@ 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; \ No newline at end of file