Having a little cross-compiler trouble here.
I have the following sub-routine:
SUBROUTINE GETTIM(hh,mm,ss,hun)
INTEGER *2 hh,mm,ss,hun
INTEGER dt(8)
CALL DATE_AND_TIME(values=dt)
hh=dt(5)
mm=dt(6)
ss=dt(7)
hun=dt(8)/10
RETURN
END
When I call this on my development computer (x86 32bit Debian Etch)
with g77 (ver 3.4.6) or with g95 (ver 4.1.2), it compiles fine.
However, when I tried to compile it on FreeBSD server with g77-32 (ver
3.2.3), I get the following errors:
DateAndTime.for: In subroutine `gettim':
DateAndTime.for:27:
CALL DATE_AND_TIME(values=dt)
^
Reference to intrinsic `DATE_AND_TIME' at (^) invalid -- one or more
arguments have incorrect type
DateAndTime.for:27:
CALL DATE_AND_TIME(values=dt)
1 2
Invalid token at (2) in expression or subexpression at (1)
------------
According to my understanding of the g77 manual, this should be
correct. Can anyone help?
Thanks in advance,
Matt.
g77 wasn't an f90 compiler. I'm surprised that even in a final version,
it could have accepted argument keywords. Evidently, it didn't accept
them as late as the 3.2 version.
When we implemented date_and_time for g77, it took the same subset form
as it did in VAX/VMS f77: no keyword named arguments, no skipped arguments.
Yup. That did it.
Thanks for your help,
Matt.
That's no great hardship though. I would think that to call date_and_time
in the extensions Tim addresses, a caller would make the follwoing
declarations:
INTEGER date_time(8)
CHARACTER(LEN=10) big_ben(3)
CALL DATE_AND_TIME(big_ben(1), big_ben(2), big_ben(3), date_time)
No keywords nor options omitted.
--
George
I understand everybody in this country doesn't agree with the decisions
I've made. And I made some tough decisions. But people know where I stand.
George W. Bush
Picture of the Day http://apod.nasa.gov/apod/