comp.lang.ada
 help / color / mirror / Atom feed
From: kst@alsys.com (Keith Thompson)
Subject: Re: GNAT-Problem / Please Help !!
Date: Thu, 17 Nov 1994 23:27:16 GMT
Date: 1994-11-17T23:27:16+00:00	[thread overview]
Message-ID: <CzFqHH.Lu4@alsys.com> (raw)
In-Reply-To: 39lbil$euf@tucs6.rz.tu-cottbus.de

In <39lbil$euf@tucs6.rz.tu-cottbus.de> ak@informatik.tu-cottbus.de (Andreas Krohn) writes:
> I've a problem with the Set_Col() and Set_Line() Functions.
> Everytime I use a number the call works, but when i use a variable
> in the call the compiler says "invalid parameter list in call".

We've spent so much time discussing the evils and benefits of strong
typing that we've neglected the real problem -- an unhelpful error
message.

Someone should probably send a note to the GNAT bugs mailing list about
the error message.  A message about a type mismatch for the specific
parameter involved would be more helpful than a complaint that the entire
parameter list is invalid.  I'd send it in myself, but I don't remember
the address and I don't have a copy of GNAT to reproduce the problem.

Of course, this kind of thing can be very difficult to do in the presence
of overloading and default parameters.  Given a call whose parameters
don't match any of the visible overloaded subprograms of a given name,
the compiler would have to "guess" which one the user had in mind and
which parameter is of the wrong type (sort of like automated spelling
correction but with more degrees of freedom -- if that makes any sense).
It might be worthwhile to have special-case recovery for non-overloaded
subprograms.

In any case, I wouldn't expect the GNAT team to spend too much time on
fancy error detection and recovery when there are still language features
to implement.

-- 
Keith Thompson (The_Other_Keith)  kst@alsys.com
TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc.
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
/user/kst/.signature: I/O error (core dumped)



  parent reply	other threads:[~1994-11-17 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-07 13:54 GNAT-Problem / Please Help !! Andreas Krohn
1994-11-12 21:31 ` Tucker Taft
1994-11-13 12:41 ` Robert Dewar
1994-11-17 23:27 ` Keith Thompson [this message]
1994-11-19  7:19   ` Robert Dewar
replies disabled

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