SAL Home PROGRAM Tools & Utilities


Argtable is a freely available programmer's library for parsing the command line arguments of any C/C++ program. It allows the programmer to specify the desired format of the command line arguments in one or more statically defined arrays known as argument tables. Each row of an argument table specifies the data type of an expected argument and nominates a user-defined program variable as storage for the incoming argument value. If arguments require default values, then these too are specified in the argument table. Once an argument table has been established, parsing the command line is simply a matter of calling an argtable library function which attempts to resolve the program's argv[] arguments with the entries of the argument table. If successful, the command line arguments are now known to be valid and their values are ready and available for use in their nominated program variables. If, on the other hand, the arguments could not be successfully resolved then the program has the choice of trying again with an alternative argument table (for programs with multiple usages), or it can flag the error to the user and terminate. When argtable does detect an error in the command line it automatically generates the appropriate error message strings for you, so error reporting is usually just a matter of printing these strings to stdout or stderr. Argtable also provides some auxiliary functions that allow the programmer to generate plain text descriptions of the individual arguments and their overall usage syntax directly from an argument table. These make it easy to generate useful on-line help facilities that are guaranteed to be up to date with your code.

Current Version:   1.2

License Type:   LGPL

Home Site: (argtable-*.tar.gz)

Source Code Availability:   Yes

Available Binary Packages:

  • Debian Package:   No
  • RedHat RPM Package:   No
  • Other Packages:   ??

Targeted Platforms:

Has been compiled on IRIX, IRIX64, SunOS, DEC, and Linux systems.

Software/Hardware Requirements:

ANSI C Compiler

Other Links:

Mailing Lists/USENET News Groups:


User Comments:

  • None

See A Screen Shot? (Not Yet)

  SAL Home   |   Programming   |   Tools & Utilities

Comments? SAL@KachinaTech.COM
Copyright © 1995-2001 by Herng-Jeng Jou
Copyright © 1997-2001 by Kachina Technologies, Inc.
All rights reserved.