GNU AutoGen - The Automated Program Generator: 7.11.1 assigning a string value to a configurable

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

### 7.11.1 assigning a string value to a configurable

The basic syntax is a name followed by a value on a single line. They are separated from each other by either white space, a colon (`:`) or an equal sign (`=`). The colon or equal sign may optionally be surrounded by additional white space. If more than one value line is needed, a backslash (`\`) may be used to continue the value. The backslash (but not the newline) will be erased. Leading and trailing white space is always stripped from the value.

Fundamentally, it looks like this:

    name  value for that name
    name = another \
         multi-line value \
         for that name.
    name: a *third* value for ``name''

If you need more control over the content of the value, you may enclose the value in XML style brackets:

    <name>value </name>

Within these brackets you need not (must not) continue the value data with backslashes. You may also select the string formation rules to use, just add the attribute after the name, thus: `<name keep>`.

‘`keep`’

  This mode will keep all text between the brackets and not strip any white space.

‘`uncooked`’

  This mode strips leading and trailing white space, but not do any quote processing. This is the default and need not be specified.

‘`cooked`’

  The text is trimmed of leading and trailing white space and XML encodings are processed. These encodings are slightly expanded over the XML specification. They are specified with an ampersand followed by a value name or numeric value and then a semicolon:

  ‘`amp`’
  ‘`lt`’
  ‘`gt`’
  ‘`quot`’
  ‘`apos`’
  ‘`#dd`’
  ‘`#xHH`’

    These are all per fairly standad HTML and/or XML encodings. Additionally:

  ‘`bs`’

    The ASCII back space character.

  ‘`ff`’

    The ASCII form feed character.

  ‘`ht`’

    The ASCII horizontal (normal) tab character.

  ‘`cr`’

    The ASCII carriage return character.

  ‘`vt`’

    The ASCII vertical tab character.

  ‘`bel`’

    The ASCII alarm bell character.

  ‘`nl`’

    The ASCII new line character.

  ‘`space`’

    The ASCII space character. Normally not necessary, but if you want to preserve leading or trailing space characters, then use this.

And here is an example of an XML-styled value:

    <name cooked>
        This is&nl;&ht;another multi-line
    &ht;string example.
    </name>

The string value associated with “name” will be exactly the text enclosed in quotes with the encoded characters “cooked” as you would expect (three text lines with the last line not ending with a newline, but ending with a period).

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

This document was generated by Bruce Korb on March 7, 2011 using texi2html 1.82.