Sujet : Re: basic BASIC question
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 05. Feb 2025, 14:03:02
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <67a36186$0$717$14726298@news.sunsite.dk>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 2/3/2025 3:39 PM, Arne Vajhøj wrote:
On 2/3/2025 1:35 PM, Simon Clubley wrote:
On 2025-01-31, Arne Vajhøj <arne@vajhoej.dk> wrote:
Fortran got some other rather unique usages
of logicals:
>
$ type morelogfun.for
program morelogfun
logical*1 a(12)
data a/1hH,1he,1hl,1hl,1ho,1h ,1hw,1ho,1hr,1hl,1hd,1h!/
integer*4 i
write(*,*) (a(i),i=1,12)
write(*,'(1x,12a1)') (a(i),i=1,12)
end
$ for morelogfun
>
DEC Fortran still allows Hollerith constants without having to specify
a compiler option to enable them ?
>
For people who do not know historical Fortran, see:
>
https://en.wikipedia.org/wiki/Hollerith_constant
>
Hollerith constants have been removed from the current Fortran language
standards (and rightly so).
It is an extension in VMS fortran.
And even though it is a horrible way to do text, then it
is not something one get to use accidentally.
Note that it does give warnings with /STAND=F90 and
/STAND=F95.
But default is /NOSTAND (which really could have
been called /STAND=VAX in my opinion as VAX Fortran
is a thing).
The problem with /STAND=F9x is that it also give
warnings for other things that may be deemed less
important. For the above code logical*1 and integer*4
also gives warning with /STAND=F9x.
Arne