[gfortran] Implementation SYSTEM_CLOCK intrinsic subroutine

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Fri May 14 11:34:00 GMT 2004


Steve Kargl wrote:
>    program a          ! system_clock requires at least 1 of its
>    call system_clock  ! optional arguments to be present.
>    end program a
> 

I don't see that this is true. The standard says that each of these 
arguments are optional, and there is no constraint that one be present, 
as in the case of SELECTED_REAL_KIND for instance. Of course the call 
doesn't make much sense if no arguments are given.

In case I'm mistaken:

> +try
> +gfc_check_system_clock (gfc_expr * count, gfc_expr * count_rate,
> +                        gfc_expr * count_max)
> +{
> +

gfc_check_selected_real_kind does this at the beginning of the function:
   if (p == NULL && r == NULL)
     {
       gfc_error ("Missing arguments to %s intrinsic at %L",
		 gfc_current_intrinsic, gfc_current_intrinsic_where);

       return FAILURE;
     }

- Tobi



More information about the Fortran mailing list