Browse Prior Art Database

FISLIB: A Subroutine Package to Simplify the Writing of FORTRAN Interactive Programs

IP.com Disclosure Number: IPCOM000083476D
Original Publication Date: 1975-May-01
Included in the Prior Art Database: 2005-Mar-01
Document File: 2 page(s) / 13K

Publishing Venue

IBM

Related People

Bednowitz, AL: AUTHOR [+2]

Abstract

For FORTRAN Subroutine Library (FISLIB) interactive programs at least two functions are required: a flexible command capability and a free-form input. The implementation of these functions has been simplified with the aid of two basic subroutines. These subroutines are described below in their current FORTRAN implementation on VM/CMS. The same concepts could also be implemented with most programming languages on most conversational systems.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

FISLIB: A Subroutine Package to Simplify the Writing of FORTRAN Interactive Programs

For FORTRAN Subroutine Library (FISLIB) interactive programs at least two functions are required: a flexible command capability and a free-form input. The implementation of these functions has been simplified with the aid of two basic subroutines. These subroutines are described below in their current FORTRAN implementation on VM/CMS. The same concepts could also be implemented with most programming languages on most conversational systems.

The basic input subroutine is accessed by the statement: CALL READT (length, value, ntype) where "LENGTH" is the dimension of the arrays "VALUE" and "NTYPE". This subroutine tokenizes a terminal input line according to suitable delimiters and places the tokens in the array VALUE.

If these tokens are numbers they are converted to their internal representation, otherwise they are stored as literals. A flag or descriptor indicating the nature of the token is placed in the corresponding element of the array NTYPE. These descriptors in addition to differentiating between literals and numbers, also specify the subtype, real, integer or hexadecimal.

A user program may perform different decoding functions on the tokens in VALUE depending on their type, as specified by the descriptors in NTYPE. To decode literals the second basic subroutine is used. It is accessed by:

CALL DECODC (comnd, clist, msg, kgoto, &stmnt), where "COMND" is a word (usually a token from the array VALUE) to be compared with a list of words in the array "CLIST". The variable "KGOTO" is set to the index of the element of CLIST that best matches the content of COMND. This pointe...