[Info-vax] COBOL example $MGBLSC

Johnny Billquist bqt at softjar.se
Sat Sep 9 14:50:05 EDT 2023


On 2023-09-09 18:47, bill wrote:
> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>> On 9/9/2023 11:36 AM, bill wrote:
>>> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>>>> Old languages sometimes has some rules that appears
>>>> very weird, because the expectation today is determined
>>>> by how a hundred newer languages has agreed on doing things
>>>> a different way.
>>>>
>>>> Take as an example this perfectly valid Fortran 77 program:
>>>>
>>>>        program weird
>>>>        integer*4 abc
>>>>        abc = 123
>>>>        write(*,*) abc
>>>>        write(*,*) a b c
>>>>        write(*,*) a     b     c
>>>>        end
>>>>
>>>> WTF??
>>>
>>> As an old school Fortran programmer as well as COBOL (Fortran was my
>>> second language other than various assemblers) all I see in this is
>>> that you don't understand Fortran.  That is a perfectly valid, not
>>> weird at all, program.  If you wanted it to treat "a", "b" and "c"
>>> as separate and distinct variables you should have used commas as the
>>> the language expects.  Spaces in that context are meaningless.  :-)
>>
>> Today it is considered weird that you can insert arbitrary
>> spaces in variable names.
>>
> 
> That is all about parsing and really has nothing to do with the
> function of the language.  The separator in that context is a comma,
> not a space, tab or any other invisible character.  :-)

It is not purely about parsing, but about the definition of the 
language. Fortran 77 explicitly considered whitespace in this context as 
non-significant.

Parsing is (or should be) based on the language specification/definition.

   Johnny




More information about the Info-vax mailing list