The NLEDIT computer program implements a generic graphical user interface for the preprocessing of FORTRAN namelist input files. The interface consists of a menu system, a message window, a help system, and data-entry forms. A form is generated for each namelist. The form includes an input field for each namelist variable along with a one-line description of that variable. Detailed help information, default values, and minimum and maximum allowable values can all be displayed via menu picks. Inputs are processed through a scientific-calculator program that provides for the use of complex equations instead of simple numerical inputs. A custom user interface is generated simply by entering information about the namelist input variables into an ASCII file. There is no need to learn a new graphics software system or programming language. NLEDIT can be used as a stand-alone program or as part of a larger graphical-user-interface program. Although NLEDIT is intended for files using namelist format, it can be easily modified to handle other file formats.

NLEDIT is customized for a particular application by use of a data-definition file. The data-definition file is an ASCII file that contains such information about such program inputs as the names, types, dimensions, default values, and limits of variables, plus help information. NLEDIT reads this information into a data base and then uses it to produce an appropriate interface. The user interface changes only in appearance for a particular data-definition file; no recompiling of code is necessary.

The NLEDIT Program is composed of three main modules: the calculator module, the data dictionary (or data base), and the graphics module. The calculator module is used to convert an equation, in the form of a character string, into a numerical value. The data dictionary allows the other modules to store and retrieve information about specific items defined in the data-definition file. The graphics module is the Motif code for displaying windows and processing input events.

NLEDIT is written in C language and has been successfully implemented on an SGI Indigo 2 computer under IRIX 5.3, an IBM RS/6000 computer running AIX v4, and a Sun Sparcstation computer under SunOS 4.1.3. This software package requires MIT's X Window System, Version 11, Revision 4 and OSF/Motif 1.1 or higher. A FORTRAN 77 compiler that supports namelist input is also required to compile the included sample FORTRAN program. The standard distribution medium for NLEDIT is a 0.25-in. (6.35-mm) streaming-magnetic-tape cartridge (Sun QIC-24) in UNIX tar format. Alternate distribution media are available upon request. An electronic copy of the documentation in PostScript format is included on the distribution medium. NLEDIT was released in 1995.

This program was written by B. P. Curlett of Lewis Research Center. LEW-16141

NASA Tech Briefs Magazine

This article first appeared in the December, 1998 issue of NASA Tech Briefs Magazine.

Read more articles from the archives here.