4 ms·
At least in early versions there would have been some motivation to constrain the length of variable names, because a line of code needed to fit in an 80 column
by ams6110 8y ago
At least in early versions there would have been some motivation to constrain the length of variable names, because a line of code needed to fit in an 80 column punch card.
- eesmith 8y agoI don't believe you are correct. I found nothing in the COBOL 60 documentation concerning a required width. The closest (in section VIII "Reference Format") was "right hand margin Z is determined by the width of the paper or printing media". While it's true that the 80 column IBM card was by far the most popular, other options were available. I can believe that a COBOL implementation for the Remington Rand might use all 90 columns. The COBOL 60 documentation says (section 2, "Words") that variables are no more than 30 characters in length. There was no need to fit everything in the same physical line because COBOL 60 supported line continuation, using a "-" as the last character position of the line (section VIII-2, "Reference Format"). This could even occur in the middle of a name.