comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Curious function signature issue
Date: Thu, 24 Oct 2013 15:03:09 -0700
Date: 2013-10-24T15:03:09-07:00	[thread overview]
Message-ID: <l4c5eu$jhp$1@dont-email.me> (raw)
In-Reply-To: <eb5ecb8f-461b-4852-a5cc-96d9e897610a@googlegroups.com>

On 10/24/2013 02:12 PM, RasikaSrinivasan@gmail.com wrote:
>
> package P is
>     type Person_Type is private ;
>     function Create( targetsfile : String := "targets.dat" ;
>                      basalfile : String := "basal.dat" ;
>                      isffile : String := "isf.dat" ;
>                      icrfile : String := "icr.dat" )
>                     return Person_Type ;
>     function Create return Person_Type ;
>
> I am curious how gnat (2013 if it matters) can distinguish between the two overloaded "Create" functions?

One has parameters; the other doesn't.

It's at the point of a call to one of these that the compiler has to be able to 
determine which is being called. I can't see how you could successfully call the 
Create without parameters, or the Create with parameters using all the defaults, 
so I suspect you must have only called the version with parameters, and supplied 
an actual parameter.

-- 
Jeff Carter
"My mind is a raging torrent, flooded with rivulets of
thought, cascading into a waterfall of creative alternatives."
Blazing Saddles
89


  reply	other threads:[~2013-10-24 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 21:12 Curious function signature issue RasikaSrinivasan
2013-10-24 22:03 ` Jeffrey Carter [this message]
2013-10-24 22:04 ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox