getenv implementation?

Paul Brook paul@codesourcery.com
Mon Aug 30 00:22:00 GMT 2004


On Monday 30 August 2004 00:21, Tobias Schlüter wrote:
> - resolution functions: these are used to determine which library function
> to call, as this can change depending on the datatypes of the arguments,
> and depending on which arguments are present. Not needed here -- there's
> only one valid combination of arguments, and therefore there's only one
> function that can be called

While this is technically correct, it isn't the whole story (as usual :-)

The resolution also sets the return type for functions. In the majority of 
cases it is this ant the gfc_generic_isym_id that determine the code 
generated/function called. Most of the names set in iresolve.c are redundant. 

In fact with a bit of tweaking we could probably remove a big chunk of 
iresolve.c altogether. The real question is whether it's worth doing this on 
its own, or using it as an excuse to rewrite chunks of our intrinsic handling 
code.

Intrinsic subroutines are a bit different. For these the name is important, 
and your statement above is accurate.

Some intrinsics also use the resolution function to coerce the arguments to a 
particular type. This is used where we want different constraints for code 
generation that the standard specifies. Examples are the "n" parameter of 
BESJN and the MAX intrinsic.

HTH

Paul



More information about the Fortran mailing list