

	     evaluate_parameters 2.1 for C, Perl and Tcl


    evaluate_parameters, designed as a replacement for the getopt family of
functions, is now available.  Briefly, evaluate_parameters parses a Unix
command line in a simple and consistent manner, performs type-checking on
parameter values and provides three levels of help on the command, its
parameters and their possible values.

    evaluate_parameters for C, Perl and Tcl is also embeddable in your
application.

    There are several advantages to using evaluate_parameters in all your C
Perl and Tcl programs:

 - Every program or application command calling evaluate_parameters has a
   -? switch which lists all the command line arguments and their aliases,
   the types of parameter values they expect, and their default values.
   Many commands have no man pages so this first-level help is the only
   help available to a user.  This is provided automatically as part of
   evaluate_parameters; no code is required in your application.  

   An optional help Message Module can be defined to provide additional
   help for the command and all its parameters.  This information is
   displayed when -full_help is specified on the command line.

 - Because evaluate_parameters allows command line arguments to have an
   alias, parameters can be given meaningful names which a user can readily
   understand.  Hackers, on the other hand, can use the abbreviation to
   speed their work.

 - evaluate_parameters verifies that the value specified for a command
   line argument is of the appropriate type. Types currently supported are
   switch, string, real, integer, boolean, file, key, application and name.

   For C, parameter values are returned in a structure known as the PVT
   (Parameter Value Table) and are available in two forms; unconverted C
   strings and type-converted values.

   For Perl, since the language performs type conversion automatically,  you
   simply get the parameter's value in global variables:  the `old' way in
   variables of the form $opt_parameter and @opt_parameter, and the `new' 
   way in the associative arrays %options and %Options.  If you use %Options
   (or %options), Perl 4 lists are returned as a string `joined' by the
   multi-dimensional array emulation character ($;), while Perl 5 lists are
   returned as a reference to a list.

   For Tcl, since the language performs type conversion automatically,  you
   simply get the parameter's value in global variables:  the `old' way in
   variables of the form $opt_parameter, and the `new' way in  the
   associative array $options and $Options.  If you use $Options (or
   %options) lists are returned as a string `joined' by the multi-dimensional
   array emulation character (\x1C).

 - All parameter types except switch may be lists.

 - An auxiliary Perl program called generate_tk_program automatically writes
   Tcl/Tk X11 Motif GUI wrappers for any program using evaluate_parameters.
   Tcl 7.0 and Tk 3.3 or above are required.  Here are the general capabilities
   of programs created by generate_tk_program:

   . Command line parameters are specified via a form.  Most are Entry widgets,
     except for parameters of type key, switch and boolean which are
     Radiobutton widgets.

   . For `list of' command line parameters we make these widget distinctions:

  	key		Checkbutton widget
	switch		not allowed
	other types	Entry widget with multiple space-separated items

   . Complete command and parameter help (from the evaluate_parameters Message
     Module) displayed in a scrollable Text widget.

   . A scrollable Entry widget dynamically displays the command to be executed.

   . After execution the command's standard output is captured in a separate
     Toplevel window.  This window can be saved to a file or directed to a
     command pipeline.

   . Parameters are labelled with Button widgets rather than Label widgets so
     clicking on a command line parameter Button positions the help window
     automatically to the help text for that parameter.  The scrollable Entry
     widget is also repositioned to show the specified parameter.

   . Important items that should be highlighted for the user to see are
     displayed in a configurable background color using the X11 resource name
     `name.highlight : color'.       	

   . An Undo selection to reset all command line parameters to their original
     values.

   . Usage help explaining the characteristics of applications generated by
     generate_tk_program, and details of evaluate_parameters.

   . The generated program dynamically determines if your Tk has the AddInput
     extension, and uses non-blocking reads of standard output so that the
     command can be cancelled.  Without AddInput, the application will hang if
     the Unix program never completes.

 - An auxiliary Perl program called generate_man_page automatically creates a
   simple nroff man page for any program using evaluate_parameters.

 - evaluate_parameters for C interfaces cleanly with Xlib or Xt.

 - Your job of developing applications is simplified because you don't waste
   time writing code to process arguments again, and again, and again!
   Command line parsing is simple, compact and consistent.  Adding or changing
   command line parameters is extremely easy.

 - Most importantly, as long as you adhere to the Human Interface Guidelines,
   evaluate_parameters provides for a consistent user interface across all
   your C, Perl and Tcl programs.


                               Availability

All the implementations of evaluate_parameters are available via anonymous FTP
from ftp.Lehigh.EDU (128.180.63.4).  Look in the pub/evap/evap-2.x directory
for the latest compressed tar file.       


evaluate_parameters/C is known to work on AIX, EP/IX, HP-UX, IRIX, Sony NEWS,
SunOS and TitanOS.  It has in the past also worked on VX/VE.

evaluate_parameters/Perl is known to work on AIX and MS-DOS.

evaluate_parameters/Tcl is known to work on AIX.


Stephen O. Lidie
Lehigh University Computing Center

lusol@Lehigh.EDU, 94/05/13
