Browse Prior Art Database

Structured Programming Complex Structured IF Algorithm

IP.com Disclosure Number: IPCOM000082677D
Original Publication Date: 1975-Jan-01
Included in the Prior Art Database: 2005-Feb-28
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Kawalec, MT: AUTHOR

Abstract

The following method describes how a complex IF (a decision block containing many conditions connected by "AND" and "OR" logical connections, commonly used in structured programming) can be implemented using a macro language capability. Four logical connections, AND, OR, (AND), and (OR) are used to provide the flexibility necessary to evaluate any Boolean expression of decision conditions (IF macros) comprising a complex IF. The four logical connections specify the order in which the decision conditions are paired in the evaluation process.

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

Page 1 of 1

Structured Programming Complex Structured IF Algorithm

The following method describes how a complex IF (a decision block containing many conditions connected by "AND" and "OR" logical connections, commonly used in structured programming) can be implemented using a macro language capability. Four logical connections, AND, OR, (AND), and (OR) are used to provide the flexibility necessary to evaluate any Boolean expression of decision conditions (IF macros) comprising a complex IF. The four logical connections specify the order in which the decision conditions are paired in the evaluation process.

For each IF macro instruction processed by the assembler, a label of the form THEN x is queued on the LIFO THEN QUEUE (see steps 1, 3, 5, 7, and 9), a label of the form ELSE x is queued on the LIFO ELSE QUEUE (steps 1, 3, 5, 7, and 9), and conditional branch code in the form of a BRANCH IF statement is generated (see steps 2, 4, 6, and 8). Finally, branch point definition(s) are generated according to the logical connective as follows: Logical Connective Action (AND) Deque a THEN branch point label from THENQ and use it to define a branch point. (OR) Deque an ELSE branch point label from EL;SEQ and use it to define a branch point. AND Empty complete THENQ, defining a branch point for each branch point label removed. OR Empty complete ELSEQ, defining a branch point for each branch point label removed.

For a THEN macro instruction, branch point definition(s) are generated fo...