From: stt@dsd.camb.inmet.com (Tucker Taft)
Subject: Re: GNAT-Problem / Please Help !!
Date: Sat, 12 Nov 1994 21:31:29 GMT
Date: 1994-11-12T21:31:29+00:00 [thread overview]
Message-ID: <Cz6BsH.GAE@inmet.camb.inmet.com> (raw)
In-Reply-To: 39lbil$euf@tucs6.rz.tu-cottbus.de
In article <39lbil$euf@tucs6.rz.tu-cottbus.de>,
Andreas Krohn <ak@informatik.tu-cottbus.de> wrote:
>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".
>Could anybody help an ada-beginner with the problem ?
You probably have a type mismatch. Set_Col and Set_Line both expect
parameters of subtype Text_IO.Positive_Count. When you use
numeric literals, you don't need to worry about the particular integer
type. But when you use a variable, you need to declare it to be
of the right (sub)type, or convert it on use. For example, the following
should work:
C : Text_IO.Positive_Count;
...
C := 22;
Text_IO.Set_Col(C);
Alternatively, you can write:
X : Integer;
...
X := 22;
Text_IO.Set_Col(Text_IO.Positive_Count(X));
The former is methodologically preferable, in general, because it makes
it clear that "C" represents a count to be used with Text_IO column
and line operations.
-Tucker Taft stt@inmet.com
Intermetrics, Inc.
Cambridge, MA 02138
The problem is that
>
>Thank you.
>
next prev parent reply other threads:[~1994-11-12 21:31 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 [this message]
1994-11-13 12:41 ` Robert Dewar
1994-11-17 23:27 ` Keith Thompson
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