ANNOUNCE - evap 2.1 for C, Perl and Tcl 
Author Message
 ANNOUNCE - evap 2.1 for C, Perl and Tcl

             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

                      What's New In Version 2.1?

 . evaluate_parameters for Tcl.
 . evaluate_parameters is now embeddable in your C, Perl and Tcl programs.
   The new entry point `evap_pac' (Process Application Commands) can
   handle all user input - you simply supply the command processors.
   `evap_pac' has two builtin command processors:

        !                            - bang, execute shell commands
        display_application_commands - list all valid commands

 . Help Hooks to customize evaluate_parameters' help output.
 . All help information is paged using MANPAGER (or PAGER).  There are
   environment variables you can define to revert to the old behavior.

                       Why evaluate_parameters?

    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

   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

   . 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

   . 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.


All the implementations of evaluate_parameters are available via anonymous
FTP from ftp.Lehigh.EDU (  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

Tue, 19 Nov 1996 00:55:34 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ANNOUNCE: ActiveState Releases Tcl Dev Kit 2.1

2. ANNOUNCE: BLT 2.1 (preliminary) patch for tcl/tk8.0a1

3. ANNOUNCE: BLT 2.1 (preliminary) patch for tcl/tk8.0a1

4. Difficulties with BLT 2.1 and [incr Tcl 2.1]

5. incr Tcl 2.1 & BLT 2.1

6. ANNOUNCE: Perl/Python/Tcl Interfaces for Verilog PLI

7. Announce: Http Server Programming with Persistent Perl and Tcl

8. ANNOUNCE: Check Book Balancer for Unix (Perl/Tcl/Tk)

9. ANNOUNCE: A Tcl/Tk/Perl Check Book Balancing Program (Version 0.40a)

10. Tcl v7.5/ [incr Tcl] 2.1 - Y2K

11. ANNOUNCE: hpmodeset 2.1

12. Announcing version 2.1 Lua, a language for extending applications


Powered by phpBB® Forum Software