[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.2 Basic Expression

A basic expression can have one of the following forms:

'STRING'

A single quoted string. Backslashes can be used to protect single quotes ('), hash characters (#), or backslashes (\) in the string. All other characters of STRING are output as-is when the single quoted string is evaluated. Backslashes are processed before the hash character for consistency with the definition syntax. It is needed there to avoid preprocessing conflicts.

"STRING"

A double quoted string. This is a cooked text string as in C, except that they are not concatenated with adjacent strings. Evaluating "‘STRING’" will output STRING with all backslash sequences interpreted.

`STRING`

A back quoted string. When this expression is evaluated, STRING is first interpreted as a cooked string (as in ‘"STRING"’) and evaluated as a shell expression by the AutoGen server shell. This expression is replaced by the ‘stdout’ output of the shell.

(STRING)

A parenthesized expression. It will be passed to the Guile interpreter for evaluation and replaced by the resulting value. If there is a Scheme error in this expression, Guile 1.4 and Guile 1.6 will report the template line number where the error occurs. Guile 1.7 has lost this capability.

Guile has the capability of creating and manipulating variables that can be referenced later on in the template processing. If you define such a variable, it is invisible to AutoGen. To reference its value, you must use a Guile expression. For example,

 
[+ (define my-var "some-string-value") +]

can have that string inserted later, but only as in:

 
[+ (. my-var) +]

Additionally, other than in the % and ?% expressions, the Guile expressions may be introduced with the Guile comment character (;) and you may put a series of Guile expressions within a single macro. They will be implicitly evaluated as if they were arguments to the (begin ...) expression. The result will be the result of the last Guile expression evaluated.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Bruce Korb on August 21, 2015 using texi2html 1.82.