From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: GNAT-Problem Set_Line(), Set_Col()
Date: 15 Nov 1994 12:36:04 -0500
Date: 1994-11-15T12:36:04-05:00 [thread overview]
Message-ID: <3aari4$jlc@felix.seas.gwu.edu> (raw)
In-Reply-To: 3aad5q$qn9@watnews1.watson.ibm.com
In article <3aad5q$qn9@watnews1.watson.ibm.com>,
Norman H. Cohen <ncohen@watson.ibm.com> wrote:
>In article <395jba$kbs@tucs6.rz.tu-cottbus.de>, ak@informatik.tu-cottbus.de
>(Andreas Krohn) writes:
>
>|> When I use these functions with a variable then the compiler says
>|> "Invalid parameter list in call".
>|> If it is a number then it works. Where is the problem ?
>
>My guess is that you've declared the variables to be of type Integer.
>Set_Line and Set_Col take parameters of the integer type Text_IO.Count.
>(An integer literal is acceptable where a value of any integer type is
>expected.)
I'd like to hear from Norm or another Ada Wise Person why it was thought
necessary to declare a new type for Text_IO.Count, instead of simply using
Positive. I know the usual arguments about portability and predefined types,
but of course Text_IO.Count is also a predefined type with implementation
defined range, so the advantage is not at all obvious.
In my opinion, the use of a new type here causes exactly the kind of
confusion Andreas encountered; are the benefits of a distinct type in
this case worth it when balanced against the confusion?
Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman - chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University - Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet)
------------------------------------------------------------------------
Ada on the World-Wide Web: http://lglwww.epfl.ch/Ada/
------------------------------------------------------------------------
"Non illegitimi carborundum." (Don't let the bastards grind you down.)
------------------------------------------------------------------------
next prev parent reply other threads:[~1994-11-15 17:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-01 14:28 GNAT-Problem Set_Line(), Set_Col() Andreas Krohn
1994-11-12 15:49 ` Robert Dewar
1994-11-15 13:30 ` Norman H. Cohen
1994-11-15 17:36 ` Michael Feldman [this message]
1994-11-15 19:10 ` Tucker Taft
1994-11-15 22:41 ` Michael Feldman
1994-11-16 0:04 ` Norman H. Cohen
1994-11-16 13:48 ` Robert Dewar
1994-11-16 0:56 ` Keith Thompson
1994-11-17 2:50 ` Michael Feldman
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox