1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

*

it obviously needs to have the argc and argv parameters that are passed to our main procedure, but its also needs to know the arguments that it can expect to see on the command line

how do we communicate the argument descriptions to this procedure, what information do we need to know about each argument?

for each argument there are three things that we need to know, the flag for the argument, where the argument's value is to be stored, and the type of the argument's value

we can store this information in a table, or array, with one entry for each parameter, this array is called an argument description table, and is one of the parameters that is passed to the process_arguments procedure

how will process_arguments return the information that it finds?

for arguments with flags this is easy, the argument description contains pointers to the variables where the values are to be stored

in the case of file name arguments, there are no variables to return their values in, so we will return them as the value of process_arguments

*

*

*

*

*

*

March 1, 1999

Page 5

C201/TAM