FLOW-MATIC

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search

FLOW-MATIC, originally known as B-0 (Business Language version 0), is possibly the first English-like data processing language. It was invented and specified by Grace Hopper, and development of the commercial variant started at Remington Rand in 1955 for the UNIVAC I. By 1958, the compiler and its documentation were generally available and being used commercially.

Contributions towards COBOL

Flow-Matic was a major influence in the design of COBOL. Several elements of Flow-Matic were incorporated into COBOL:

  • Defining Files in advance, and separating into INPUT and OUTPUT files.
  • Qualification of data-names (IN or OF clause).
  • IF END OF DATA (AT END) clause on file READ operations.
  • Figurative constant ZERO (originally ZZZ...ZZZ, where number of Z's indicated precision).
  • Dividing the program into sections, separating different parts of the program. Flow-Matic sections included Computer (Environment Division), Directory (Data Division), and Compiler (Procedure Division).

Sample program

A sample FLOW-MATIC program:[1]

 0) INPUT  INVENTORY FILE=A
           PRICE FILE=B,
    OUTPUT PRICED-INV FILE=C
           UNPRICED-INV FILE=D,
    HSP D.
 1) COMPARE PRODUCT-NO(A) WITH PRODUCT-NO(B)
    IF GREATER GO TO OPERATION 10;
    IF EQUAL GO TO OPERATION 5;
    OTHERWISE GO TO OPERATION 2.
 2) TRANSFER A TO D.
 3) WRITE ITEM D.
 4) JUMP TO OPERATION 8.

 5) TRANSFER A TO C.
 6) MOVE UNIT-PRICE(B) TO UNIT-PRICE(C).
 7) WRITE ITEM C.
 8) READ ITEM A; IF END OF DATA GO TO OPERATION 14.
 9) JUMP TO OPERATION 1.

10) READ ITEM B; IF END OF DATA GO TO OPERATION 12.
11) JUMP TO OPERATION 1.

12) SET OPERATION 9 TO GO TO OPERATION 2.
13) JUMP TO OPERATION 2.

14) TEST PRODUCT-NO(B) AGAINST ZZZZZZZZZZZZ;
    IF EQUAL GO TO OPERATION 16;
    OTHERWISE GO TO OPERATION 15.
15) REWIND B.
16) CLOSE-OUT FILES C, D.
17) STOP. (END)

References

This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.


de:FLOW-MATIC

es:FLOW-MATIC gl:Flow-Matic pt:Flow-Matic

Personal tools

Served in 0.240 secs.