Next: , Previous: , Up: Option Argument Specification   [Contents][Index]


7.5.6.6 Arg Type Hierarchical

arg-type = hierarchy;
arg-type = nested;

This denotes an option with a structure-valued argument, a.k.a. subopts in getopts terminology. The argument is parsed and the values made available to the program via the find and find next calls (See optionFindValue, See optionGetValue, and see optionFindNextValue).

tOptionValue * val = optionGetValue(VALUE_OPT_OPTN_NAME, "name");
while (val != NULL) {
  process(val);
  val = optionNextValue(VALUE_OPT_OPTN_NAME, val);
  if (wrong_name(val, "name"))
    break;
}