A Conversation for COBOL - the Programming Language

COBOL and line numbers

Post 1

Skogtun

COBOL does not use line numbers. Many old editors that were used for COBOL did.


COBOL and line numbers

Post 2

SchrEck Inc.

Hi Skogtun,

you're somewhat right: the area reserved for line numbers (columns 1 to 6) isn't in real use anymore, and you could just as well leave it blank or put in a date or so, but you still couldn't use it for code. I don't know whether COBOL compilers ever utilized the numbers (if so, then certainly not in the way BASIC does), but in the good old times of punch cards, the line numbers were necessary for sorting a pile of punch cards just in case you dropped them on the floor, and maybe some mainframe editors used them as a sorting device. smiley - biggrin

Thanks for reading this entry and for your comment. smiley - smiley

SchrEck Inc.


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more