Sfairadora

  • Reference Guide

Value Insertion

<expression>
<expression, flag>
The parameter expression is an Enki expression. The Enkidu command evaluates the expression and emits the text representation of the result to the output text. The expression result can be even a non-scalar value. If the result is a sequence of structures (i.e. a table), a text representation of the table is created. If the result is of the type Bitmap, an image is inserted to the output text. If the result is a number, the symbols defined in the document section Settings are used for the decimal sign and thousand separator.
A text inserted this way into the output text will have its format set according to the format of the opening bracket a used in the template. If the expression result is a Rich_string or Rich_text, the format of the bracket is used to set the attributes not specified by the expression result.
If the parameter flag is specified, it further determines the form of the text emitted by the command.

The flag parameter

Name
Description
number
For real numbers, it specified number of decimal places used in the output.
- (dash)
If the expression result is a real number, it is emitted to the result with two decimal places precision. If the both decimal digits were 0, a dash and a space (two characters of the same with as a digit, so a list of numbers will preserve alignment) are used instead. So, for instance, the figure 2,– is used for 2.00.
C (capital letter C)
If the expression result is a string, its first character is converted to upper-case.
char
If the expression result is a number, it will be encoded with characters instead of digits (i.e. 1 = a, 2 = b,… 27 = aa, 28 = ab…)
Char
Like char, but with upper-case characters.
inwords
Number expressed in natural language (i.e. one, two, three…). The language is determined by the language attribute of the character format set to the Enkidu command. If the language is not set this way, the language chosen in the document’s settings is used. The conversion of a number to the natural language words is not implemented for all languages. When not implemented, common numbers are used.
roman
Lower-case roman number (i, ii, iii, iv…)
Roman
Upper-case roman number (I, II, III, IV…)

Remarks

If another form of the emitted string is desired, it is possible to typecast the result explicitly to a String or Rich_string and modify it with Enki language functions as needed.
Using Enki languagedrawing functions a dynamically created image (e.g. a graph) can be inserted to the output text.

See Also