Browse Prior Art Database

Table-driven Method for Option Processing

IP.com Disclosure Number: IPCOM000103411D
Original Publication Date: 1990-Nov-01
Included in the Prior Art Database: 2005-Mar-17
Document File: 1 page(s) / 32K

Publishing Venue

IBM

Related People

Blakely-Fogel, D: AUTHOR [+2]

Abstract

A table-driven method for processing command options is described. This method results in an option-processing procedure that can be used for different commands by merely changing the table rather than the code.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 100% of the total text.

Table-driven Method for Option Processing

      A table-driven method for processing command options is
described.  This method results in an option-processing procedure
that can be used for different commands by merely changing the table
rather than the code.

      This method employs a table of knowledge-based rules that
describe the characteristics of a command's valid options.  The rules
contained in the table include option characteristics such as
variable type (integer, short, character string, etc.), minimum
allowable value, and maximum allowable value.  The command options
will be processed based on their variable type rather than their flag
name.

      When there is a large number of valid command options, this
table-driven method can reduce the code size and complexity by virtue
of the fact that there will be a smaller number of variable types
than option flags.  In addition, maintenance is simplified by
allowing all option-specific data to reside in the table rather than
the code.  Updating the table for new, changed, or deleted options is
less complex and error-prone than updating the code.

      Disclosed anonymously.