AutoGen - The Automated Program Generator: 7.5.6.8 Arg Type Set Membership

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

#### 7.5.6.8 Arg Type Set Membership

`arg-type = set;`

The argument must be a list of names each of which must match the strings "`all`", "`none`" or one of the keywords (see section Keyword list) specified for this option. `all` will turn on all membership bits and `none` will turn them all off. Specifying one of the keywords will turn on the corresponding set membership bit. Literal numbers may also be used and may, thereby, set or clear more than one bit. Preceding a keyword or literal number with a bang (`!` - exclamation point) will turn the bit(s) off. The number of keywords allowed is constrained by the number of bits in a pointer, as the bit set is kept in a `void*`.

If, for example, you specified `first` in your list of keywords, then you can use the following code to test to see if either `first` or `all` was specified:

    uintptr_t opt = OPT_VALUE_OPTN_NAME;
    if (opt & OPTN_NAME_FIRST)
        /* OPTN_NAME_FIRST bit was set */ ;

AutoOpts produces a special purpose procedure for this option. To set multiple bits as the default (initial) value, you must specify an initial numeric value (which might become inaccurate over time), or else specify `arg-default` multiple times. Do not specify a series of names conjoined with `+` symbols as the value for any of the `arg-default` attributes. That works for option parsing, but not for the option code generation.

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

This document was generated by Bruce Korb on June 25, 2010 using texi2html 1.82.