ArgsDoc.tioga
Bloomenthal, November 12, 1990 8:31 am PST
PCEDAR 2.0 — FOR INTERNAL XEROX USE ONLY
Args
Jules Bloomenthal
© Copyright 1986 Xerox Corporation. All rights reserved.
Abstract: This interface provides a number of procedures for parsing command-line arguments.
Created by: Jules Bloomenthal
Maintained by: Jules Bloomenthal <Bloomenthal.pa>
Keywords: Commands, arguments.
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. Software Environment
Bringover -p /Cedar/CedarChest7.0/Top/Args.df.
2. The interface
Most of the procedures return an Arg, which is a record consisting of a correctness boolean and a field for each of the types boolean, int, real, and rope.
An individual procedure specifies the command line argument to be converted as well as the type of conversion. For example, ArgReal[cmd, 1] will attempt to convert command line argument number 1 (indexed from 0 and discounting the ) to a real. If the conversion is successful, the correctness boolean of the returned Arg will be TRUE and the real field of the Arg will contain the value of the argument. If the conversion failed, the correctness boolean will be FALSE and all other fields remain undefined.
A procedure, ArgsGet, is provided which will parse and convert an entire command line according to a given format.
Refer to Args.mesa for details.