f



IDATE problem

Sorry for my bad english.

I have a problem to compile a source file with IDATE subroutine

/code
program data

use iflport
integer(4) imonth, iday, iyear, datarray(3)

CALL IDATE(IMONTH, IDAY, IYEAR)
WRITE(*,*) IMONTH, IDAY, IYEAR
CALL IDATE4 (DATARRAY)
write(*,*) datarray

end program

/end code

The error is
~/Documenti/Fortran$ ifc date.f90 
   program DATA

12 Lines Compiled
/tmp/ifc4xGweO.o: In function `main':
/tmp/ifc4xGweO.o(.text+0x2b): undefined reference to `idate_'
/tmp/ifc4xGweO.o(.text+0x89): undefined reference to `f_idate4_'

I try to compile same code with another PC and compiler (Digital
Fortran) and the code is ok!

Tanks to all
0
M
6/28/2003 6:53:56 PM
comp.lang.fortran 11941 articles. 2 followers. Post Follow

2 Replies
1094 Views

Similar Articles

[PageSpeed] 46

Hello,

idate() and idate4() are not standard.

Try date_and_time(), which is standard
and provides the functionality (and more).

--=20
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.

On Sat, 28 Jun 2003 18:53:56 GMT, -=3DM=3DM=3D-@cippa.lippa.net wrote:

>Sorry for my bad english.
>
>I have a problem to compile a source file with IDATE subroutine
>
>/code
>program data
>
>use iflport
>integer(4) imonth, iday, iyear, datarray(3)
>
>CALL IDATE(IMONTH, IDAY, IYEAR)
>WRITE(*,*) IMONTH, IDAY, IYEAR
>CALL IDATE4 (DATARRAY)
>write(*,*) datarray
>
>end program
>
>/end code
>
>The error is
>~/Documenti/Fortran$ ifc date.f90=20
>   program DATA
>
>12 Lines Compiled
>/tmp/ifc4xGweO.o: In function `main':
>/tmp/ifc4xGweO.o(.text+0x2b): undefined reference to `idate_'
>/tmp/ifc4xGweO.o(.text+0x89): undefined reference to `f_idate4_'
>
>I try to compile same code with another PC and compiler (Digital
>Fortran) and the code is ok!
>
>Tanks to all

0
dnagle (146)
6/28/2003 7:30:22 PM
-=M=M=-@cippa.lippa.net wrote:

> Sorry for my bad english.
> 
> I have a problem to compile a source file with IDATE subroutine
> 
> /code
> program data
> 
> use iflport
> integer(4) imonth, iday, iyear, datarray(3)
> 
> CALL IDATE(IMONTH, IDAY, IYEAR)
> WRITE(*,*) IMONTH, IDAY, IYEAR
> CALL IDATE4 (DATARRAY)
> write(*,*) datarray
> 
> end program
> 
> /end code
> 
> The error is
> ~/Documenti/Fortran$ ifc date.f90
>    program DATA
> 
> 12 Lines Compiled
> /tmp/ifc4xGweO.o: In function `main':
> /tmp/ifc4xGweO.o(.text+0x2b): undefined reference to `idate_'
> /tmp/ifc4xGweO.o(.text+0x89): undefined reference to `f_idate4_'
> 
> I try to compile same code with another PC and compiler (Digital
> Fortran) and the code is ok!
>
If you read the library documentation which comes with this compiler, you 
will see that the library containing these functions is searched when you 
give the -Vaxlib option.  However, there is no general agreement on the 
way these functions work for dates beyond 1999, and no program revised 
after 1989 should be using them.  Since then, the standard date_and_time 
procedure has been preferred.
-- 
Tim Prince
0
6/28/2003 10:31:10 PM
Reply: