my-server
← Wiki

COMTRAN

COMTRAN (COMmercial TRANslator) is an early programming language developed at IBM. It was intended as the business programming equivalent of the scientific programming language FORTRAN (FORmula TRANslator). It served as one of the forerunners to the COBOL language. Developed by Bob Bemer, in 1957, the language was the first to feature the programming language element known as a picture clause.

Contributions to COBOL

Several elements of COMTRAN were incorporated into COBOL:

  • Picture clause.
  • Paragraphing: dividing code into paragraphs (with line breaks not significant).
  • Paragraph names. Assigning names to paragraphs, and jumps ('s) are to a paragraph name, not to a line number.
  • clause on file input operations.
  • Figurative constant .
  • Passing a numeric value () back to the operating system when the program terminates.

Picture clause

A picture clause element defines how a particular data item should be formatted, for output. It consists of a string of letters and digits. It is similar to the FORTRAN format specifier seen in the READ and WRITE statements, or the formatting strings seen in more modern languages like C. This became an important part of COBOL.

Sample program

This is a sample COMTRAN program, doing payroll calculations.

References

Further reading

  • IBM's Early Computers, by Charles Bashe, Lyle Johnson, John Palmer, and Emerson Pugh, 1986, MIT Press, .

External links