Sujet : Re: Is there a way in Fortran to designate an integer value as integer*8 ?
De : Danny (at) *nospam* hyperspace.vogon.gov (R Daneel Olivaw)
Groupes : comp.lang.fortranDate : 04. Oct 2024, 11:13:52
Autres entêtes
Organisation : To protect and to server
Message-ID : <vdof50$1jtk1$1@paganini.bofh.team>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.18.2
Lawrence D'Oliveiro wrote:
On Thu, 3 Oct 2024 14:34:01 -0500, Lynn McGuire wrote:
My code used to assign Hollerith to Real numbers but I ripped that out
years ago in a project to get rid of Hollerith.
Fortran was the first programming language I learned (from the Anna Burke
Harris book). The only kind of string literals I can remember in that
first learning were Hollerith literals. I liked the fact that they were
unambiguous: because length was explicit up front, you could any
characters you liked in them.
Later I discovered that “normal” people preferred explicitly-delimited
string literals.
Assuming 4 bytes to a word, I find
integer txthdr (7) /4hText, 4h hea, 4hder,, 4h wit, 4hh a , 4hcomm, 4ha /
uglier than
integer txthdr (7) /'Text', ' hea', 'der,', ' wit', 'h a ', 'comm', 'a ' /
but not as friendly as
character*28 txthdr /'Text header, with a comma ' /
As to making all variables containing strings integer back before Fortran 77, that was an insurance policy to prevent disasters such as:
integer init4 / 4hinit /
real text4
c
c snip
c
text4 = init4