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


7.5.6.2 Arg Type Number

arg-type = number;

The argument must be a correctly formed integer, without any trailing U’s or L’s. AutoOpts contains a library procedure to convert the string to a number. If you specify range checking with arg-range (see below), then AutoOpts produces a special purpose procedure for this option.

scaled

scaled marks the option so that suffixes of ‘k’, ‘K’, ‘m’, ‘M’, ‘g’, ‘G’, ‘t’, and ‘T’ will multiply the given number by a power of 1000 or 1024. Lower case letters scale by a power of 1000 and upper case scale by a power of 1024.

arg-range

arg-range is used to create a callback procedure for validating the range of the option argument. It must match one of the range entries. Each arg-range should consist of either an integer by itself or an integer range. The integer range is specified by one or two integers separated by the two character sequence, ->. Be sure to quote the entire range string. The definitions parser will not accept the range syntax as a single string token.

The generated procedure imposes the range constraints as follows:

  • A number by itself will match that one value.
  • The high end of the range may not be INT_MIN, both for obvious reasons and because that value is used to indicate a single-valued match.
  • An omitted lower value implies a lower bound of INT_MIN.
  • An omitted upper value implies a upper bound of INT_MAX.
  • The argument value is required. It may not be optional.
  • The value must match one of the entries. If it can match more than one, then you have redundancies, but no harm will come of it.

Next: Arg Type Boolean, Previous: Arg Type String, Up: Option Argument Specification   [Contents][Index]