[Info-vax] Technical issues with VMS BASIC port to x86-64 ?

Arne Vajhøj arne at vajhoej.dk
Tue Feb 20 21:09:51 EST 2024


On 2/20/2024 7:51 PM, Lawrence D'Oliveiro wrote:
> On Tue, 20 Feb 2024 18:44:10 -0500, Arne Vajhøj wrote:
>> If I remember correctly then the example given in one of these threads
>> were a Fortran common block where some part of the data was initialized
>> in some code and other part of the data was initialized in other code.
> 
> COMMON blocks don’t allow for initializers.

Data can not be initialized in COMMON, but data in COMMON can be
initialized.

I believe the example was somewhat similar to:

       program bad
       integer*4 a(2)
       common /m/a
       call s1
       call s2
       write(*,*) a(1),a(2)
       end
c
       subroutine s1
       integer*4 a(2)
       common /m/a
       data a(1)/123/
       end
c
       subroutine s2
       integer*4 a(2)
       common /m/a
       data a(2)/456/
       end

Arne




More information about the Info-vax mailing list