resolve functions and optional arguments?

Steve Kargl sgk@troutmask.apl.washington.edu
Sun May 9 17:26:00 GMT 2004


On Sun, May 09, 2004 at 05:31:19PM +0100, Paul Brook wrote:
> On Sunday 09 May 2004 16:39, Steve Kargl wrote:
> > > The parameter is the node for the function call itself. The parameters
> > > are found by following count->ext.actual [->next].
> >
> > This is what I was missing.  How to find which parameter is present.
> 
> An absent parameter is indicated by actual->expr == NULL.
> 
> > > You'll also need to add add_sym_3s. This is the same as add_sym_3 except
> > > with the correct prototype for "resolve", and set rf->s1 not rs->f3. cf.
> > > add_sym1 vs. add_sym1s.
> >
> > I'll look at it today.

I have this working!  Thanks for the guidance.

> > > incorrectly > handles values > INT_MAX,
> >
> > clock() can't return any values greater than INT_MAX on FreeBSD. :-)
> 
> On linux and FreeBSD (4.8) clock() returns a clock_t. On 64-bit targets 
> (x86_64) this is is a "long", so can return values > INT_MAX. It can also 
> return negative values.

I have this fixed, but it isn't very elegant.

> 
> Also, clock() returns CPU time, SYSTEM_CLOCK should return real time.
> 

Argh.  Reading Metcalf and Reid for Fortran and Harbison and Steele
for C, I completely missed the distinction.  I'll fix this, too.


-- 
Steve



More information about the Fortran mailing list