public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* date_and_time in g77
@ 1999-12-13 12:47 Jon Ruth
  1999-12-31 22:24 ` Jon Ruth
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Ruth @ 1999-12-13 12:47 UTC (permalink / raw)
  To: help-gcc

I'm new to gcc/g77 and would appreciate recommendations on the
following problem.

The documentation for g77 f90 intrinsic date_and_time indicates that
four parameters are returned:

	CALL Date_and_Time(Date, Time, Zone, Values)
	Date: CHARACTER; scalar; INTENT(OUT). 
	Time: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Zone: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Values: INTEGER(KIND=1); OPTIONAL; DIMENSION(8); INTENT(OUT). 

I wrote the following:

     character*10 datizn(3)
     integer*2 ivalues(8)
     call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)

and received the following error message:

	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
     	^
	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

I eventually reduced the call to:

     character*8 date
     call date_and_time(date)

and the compiler was happy.

I'm porting an F77 application that compiled with Watcom but used time
and date calls that g77 does not support.  The integer representations
that the array ivalues(8) should return would involve the least amount
of rewriting.

What do I need to do in order to get date_and_time to behave as
advertised?  I suspect that the proper libraries have not been
included.

    (NOTE:  We're running Debian Linux with gcc 2.95.2.  ["g77 version
     2.95.2 19991109 (Debian GNU/Linux) (from FSF-g77 version 0.5.25
     1999 1030 (prerelease))"])

Thanks.
--
Jon Ruth
Liquid Crystal Institute
Kent State University
Kent, OH

^ permalink raw reply	[flat|nested] 6+ messages in thread

* date_and_time in g77
  1999-12-13 12:47 date_and_time in g77 Jon Ruth
@ 1999-12-31 22:24 ` Jon Ruth
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Ruth @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

I'm new to gcc/g77 and would appreciate recommendations on the
following problem.

The documentation for g77 f90 intrinsic date_and_time indicates that
four parameters are returned:

	CALL Date_and_Time(Date, Time, Zone, Values)
	Date: CHARACTER; scalar; INTENT(OUT). 
	Time: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Zone: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Values: INTEGER(KIND=1); OPTIONAL; DIMENSION(8); INTENT(OUT). 

I wrote the following:

     character*10 datizn(3)
     integer*2 ivalues(8)
     call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)

and received the following error message:

	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
     	^
	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

I eventually reduced the call to:

     character*8 date
     call date_and_time(date)

and the compiler was happy.

I'm porting an F77 application that compiled with Watcom but used time
and date calls that g77 does not support.  The integer representations
that the array ivalues(8) should return would involve the least amount
of rewriting.

What do I need to do in order to get date_and_time to behave as
advertised?  I suspect that the proper libraries have not been
included.

    (NOTE:  We're running Debian Linux with gcc 2.95.2.  ["g77 version
     2.95.2 19991109 (Debian GNU/Linux) (from FSF-g77 version 0.5.25
     1999 1030 (prerelease))"])

Thanks.
--
Jon Ruth
Liquid Crystal Institute
Kent State University
Kent, OH

^ permalink raw reply	[flat|nested] 6+ messages in thread

* date_and_time in g77
  1999-12-13 16:15 Jon Ruth
  1999-12-13 16:26 ` Richard Maine
@ 1999-12-31 22:24 ` Jon Ruth
  1 sibling, 0 replies; 6+ messages in thread
From: Jon Ruth @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

I'm new to gcc/g77 and would appreciate recommendations on the
following problem.

The documentation for g77 f90 intrinsic date_and_time indicates that
four parameters are returned:

	CALL Date_and_Time(Date, Time, Zone, Values)
	Date: CHARACTER; scalar; INTENT(OUT). 
	Time: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Zone: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Values: INTEGER(KIND=1); OPTIONAL; DIMENSION(8); INTENT(OUT). 

I wrote the following:

     character*10 datizn(3)
     integer*2 ivalues(8)
     call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)

and received the following error message:

	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
     	^
	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

I eventually reduced the call to:

     character*8 date
     call date_and_time(date)

and the compiler was happy.

I'm porting an F77 application that compiled with Watcom but used time
and date calls that g77 does not support.  The integer representations
that the array ivalues(8) should return would involve the least amount
of rewriting.

What do I need to do in order to get date_and_time to behave as
advertised?  I suspect that the proper libraries have not been
included.

    (NOTE:  We're running Debian Linux with gcc 2.95.2.  ["g77 version
     2.95.2 19991109 (Debian GNU/Linux) (from FSF-g77 version 0.5.25
     1999 1030 (prerelease))"])

Thanks.
--
Jon Ruth
Liquid Crystal Institute
Kent State University
Kent, OH

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: date_and_time in g77
  1999-12-13 16:26 ` Richard Maine
@ 1999-12-31 22:24   ` Richard Maine
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Maine @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

jruth@lci.kent.edu (Jon Ruth) writes:

> I'm new to gcc/g77 and would appreciate recommendations on the
> following problem....
>      character*10 datizn(3)
>      integer*2 ivalues(8)
>      call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
> 
> and received the following error message:
> 
> 	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
>      	^
> 	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

Did this accidentally get reposted?  I answered this (and Toon followed
up on my answer, so I know it got out) 5 days ago.  See the previous
answer (which was in comp.lang.fortran only).

In short, you got the argument type for ivalues wrong.  It should
be integer, not integer*2.  For the longer version, see my previous
post.

-- 
Richard Maine
maine@altair.dfrc.nasa.gov

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: date_and_time in g77
  1999-12-13 16:15 Jon Ruth
@ 1999-12-13 16:26 ` Richard Maine
  1999-12-31 22:24   ` Richard Maine
  1999-12-31 22:24 ` Jon Ruth
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Maine @ 1999-12-13 16:26 UTC (permalink / raw)
  To: help-gcc

jruth@lci.kent.edu (Jon Ruth) writes:

> I'm new to gcc/g77 and would appreciate recommendations on the
> following problem....
>      character*10 datizn(3)
>      integer*2 ivalues(8)
>      call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
> 
> and received the following error message:
> 
> 	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
>      	^
> 	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

Did this accidentally get reposted?  I answered this (and Toon followed
up on my answer, so I know it got out) 5 days ago.  See the previous
answer (which was in comp.lang.fortran only).

In short, you got the argument type for ivalues wrong.  It should
be integer, not integer*2.  For the longer version, see my previous
post.

-- 
Richard Maine
maine@altair.dfrc.nasa.gov

^ permalink raw reply	[flat|nested] 6+ messages in thread

* date_and_time in g77
@ 1999-12-13 16:15 Jon Ruth
  1999-12-13 16:26 ` Richard Maine
  1999-12-31 22:24 ` Jon Ruth
  0 siblings, 2 replies; 6+ messages in thread
From: Jon Ruth @ 1999-12-13 16:15 UTC (permalink / raw)
  To: help-gcc

I'm new to gcc/g77 and would appreciate recommendations on the
following problem.

The documentation for g77 f90 intrinsic date_and_time indicates that
four parameters are returned:

	CALL Date_and_Time(Date, Time, Zone, Values)
	Date: CHARACTER; scalar; INTENT(OUT). 
	Time: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Zone: CHARACTER; OPTIONAL; scalar; INTENT(OUT). 
	Values: INTEGER(KIND=1); OPTIONAL; DIMENSION(8); INTENT(OUT). 

I wrote the following:

     character*10 datizn(3)
     integer*2 ivalues(8)
     call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)

and received the following error message:

	call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)
     	^
	Too many arguments passed to intrinsic `DATE_AND_TIME' at (^)

I eventually reduced the call to:

     character*8 date
     call date_and_time(date)

and the compiler was happy.

I'm porting an F77 application that compiled with Watcom but used time
and date calls that g77 does not support.  The integer representations
that the array ivalues(8) should return would involve the least amount
of rewriting.

What do I need to do in order to get date_and_time to behave as
advertised?  I suspect that the proper libraries have not been
included.

    (NOTE:  We're running Debian Linux with gcc 2.95.2.  ["g77 version
     2.95.2 19991109 (Debian GNU/Linux) (from FSF-g77 version 0.5.25
     1999 1030 (prerelease))"])

Thanks.
--
Jon Ruth
Liquid Crystal Institute
Kent State University
Kent, OH

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-12-31 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-13 12:47 date_and_time in g77 Jon Ruth
1999-12-31 22:24 ` Jon Ruth
1999-12-13 16:15 Jon Ruth
1999-12-13 16:26 ` Richard Maine
1999-12-31 22:24   ` Richard Maine
1999-12-31 22:24 ` Jon Ruth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).