[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.1.2 Character expressions
Character expressions are defined as:
char-expression: "string" | Today | StrPrefix ( char-expression ) | StrRelative ( char-expression ) | StrCat ( char-expression , char-expression ) | Sprintf ( char-expression , expression-list ) | Sprintf ( char-expression ) Sprintf ( char-option ) |
The third and fourth cases in this definition permit to take the
prefix (e.g. to remove the extension) or the relative path of a string. The
fifth case permits to concatenate two character expressions, and the sixth
and seventh are equivalent to the sprintf
C function (where
char-expression is a format string that can contain floating point
formatting characters: %e
, %g
, etc.). The last case permits to
use the value of a char-option as a char-expression. The
various char-options are listed in General options,
Geometry options, Mesh options, Solver options, and
Post-processing options.
Character expressions are mostly used to specify non-numeric options and input/output file names. See ‘t8.geo’, for an interesting usage of char-expressions in an animation script.