[Info-vax] Text processing examples with Fortran requested
glen herrmannsfeldt
gah at ugcs.caltech.edu
Tue Nov 17 14:25:16 EST 2009
Rob Brown <mylastname at gmcl.com> wrote:
> Strangest one I ever saw (about 1975 or so) was something like:
> DOUBLE X /some long number/
> EXTERNAL X
> I=X()
> STOP
> END
> WATFIV and FORTRAN G would fail to compile. FORTRAN H would compile.
> When you ran the program, it printed the time of day.
COMMON block names and subroutine/function names are both
external names. An initialized COMMON looks the same to the
linker as does a subroutine or functions (SD in the object module).
Otherwise,
LA 1,1
SVC 12
BR 14
is eight bytes, X'411000000A0C07F4'
and is a floating point number slightly greater than one,
which is a call to the system TIME routine, which returns
the date in R0 in packed decimal form. Maybe something like
REAL*8 X
COMMON /IDATE/ X
X=1.00000003742798025
I=IDATE(1)/16
WRITE(6,1)
1 FORMAT(1X,Z5)
STOP
END
-- glen
More information about the Info-vax
mailing list