On Sun, Jan 20, 2019 at 05:04:24PM -0800, Steve Kargl wrote:
> On Tue, Jan 08, 2019 at 10:27:25PM +0100, Thomas Koenig wrote:
> > Hi Steve,
> > 
> > > Well, that was quick.  Moving code around is problematic.
> > 
> > Thanks for checking. The patch is OK for trunk.
> > 
> 
> Thanks.  I decided to see if long term approach would work.
> It almost does.  The attached patch put ieee_selected_real_kind
> into the table of intrinsic functions.  It automatically gets
> us a generic routine with argument chekcing and simplification.
> This just works:
> 
> program foo
>    use ieee_arithmetic, only : ieee_selected_real_kind
>    integer, parameter :: n = ieee_selected_real_kind(6_2)
>    i = 6
>    print *, n, ieee_selected_real_kind(6_8), ieee_selected_real_kind(i)
> end program foo
> 
> Now, the downside.  I can't finesse rename on USE.  This does not
> work, and I'm stuck at the moment.
> 
> subroutine bar
>    use ieee_arithmetic, only : isrk => ieee_selected_real_kind
>    integer, parameter :: n = isrk(6)
>    i = 6
>    print *, n, isrk(6), isrk(i)
> end subroutine bar
> 
> If anyone has an idea, I would be quite happy to hear about it.
> 

Well, I found a way to at least deal with the renaming issue.
It is ugly, and won't be pursued.

-- 
Steve

Reply via email to