* Help Ada basics
@ 2004-01-20 16:24 Ratson Janiv
2004-01-21 9:05 ` Dmitry A. Kazakov
0 siblings, 1 reply; 4+ messages in thread
From: Ratson Janiv @ 2004-01-20 16:24 UTC (permalink / raw)
I have the following not compiling code:
============================================
generic
type Language is array (Positive range<>) of Character;
type States is array (Positive range <>) of Integer;
package Automat_Producer is
...
===========================================================
And also :
*************************************************************
with Automat_Producer;
generic
with package My_Automat is new Automat_Producer (<>);
procedure Apply_String(Auto: in My_Automat; S:String);
*******************************************************************
What M I doing wrong ?
Compiler error:
apply_string.ads:6:33: subtype mark required in this context
apply_string.ads:6:33: found "My_Automat" declared at line 4
10x,
J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help Ada basics
2004-01-20 16:24 Help Ada basics Ratson Janiv
@ 2004-01-21 9:05 ` Dmitry A. Kazakov
2004-01-22 20:40 ` Mr. J.
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry A. Kazakov @ 2004-01-21 9:05 UTC (permalink / raw)
On Tue, 20 Jan 2004 18:24:22 +0200, "Ratson Janiv" <janiv@013.net.il>
wrote:
>I have the following not compiling code:
>============================================
>generic
>
>type Language is array (Positive range<>) of Character;
>
>type States is array (Positive range <>) of Integer;
>
>
>package Automat_Producer is
>
>
>...
>
>===========================================================
>
>And also :
>
>*************************************************************
>
>with Automat_Producer;
>
>generic
>
>with package My_Automat is new Automat_Producer (<>);
>
>
>procedure Apply_String(Auto: in My_Automat; S:String);
>
>*******************************************************************
>
>What M I doing wrong ?
>
>Compiler error:
>
>apply_string.ads:6:33: subtype mark required in this context
>
>apply_string.ads:6:33: found "My_Automat" declared at line 4
My_Automat is a package, not a subtype. The compiler message is quite
precise.
--
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help Ada basics
2004-01-21 9:05 ` Dmitry A. Kazakov
@ 2004-01-22 20:40 ` Mr. J.
2004-01-23 2:57 ` Robert I. Eachus
0 siblings, 1 reply; 4+ messages in thread
From: Mr. J. @ 2004-01-22 20:40 UTC (permalink / raw)
So what is the right syntax ?
10x,
J.
Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote in message
news:<74gs00t63mok7dhas0icsldmg7j1d9gcnp@4ax.com>...
> On Tue, 20 Jan 2004 18:24:22 +0200, "Ratson Janiv" <janiv@013.net.il>
> wrote:
>
> >I have the following not compiling code:
> >============================================
> >generic
> >
> >type Language is array (Positive range<>) of Character;
> >
> >type States is array (Positive range <>) of Integer;
> >
> >
> >package Automat_Producer is
> >
> >
> >...
> >
> >===========================================================
> >
> >And also :
> >
> >*************************************************************
> >
> >with Automat_Producer;
> >
> >generic
> >
> >with package My_Automat is new Automat_Producer (<>);
> >
> >
> >procedure Apply_String(Auto: in My_Automat; S:String);
> >
> >*******************************************************************
> >
> >What M I doing wrong ?
> >
> >Compiler error:
> >
> >apply_string.ads:6:33: subtype mark required in this context
> >
> >apply_string.ads:6:33: found "My_Automat" declared at line 4
>
> My_Automat is a package, not a subtype. The compiler message is quite
> precise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help Ada basics
2004-01-22 20:40 ` Mr. J.
@ 2004-01-23 2:57 ` Robert I. Eachus
0 siblings, 0 replies; 4+ messages in thread
From: Robert I. Eachus @ 2004-01-23 2:57 UTC (permalink / raw)
Mr. J. wrote:
> So what is the right syntax ?
> 10x,
> J.
No one other than you can possibly know. We can tell you that what you
wrote is illegal--heck the compiler did that. We can give you hints as
to how you might be able to say what you are trying to say. But without
the information which currently exists only in your head, no one else
can tell you what the "right" syntax is without a lot more information
than you have supplied.
Go find a TA, instructor, or even someone you know who knows Ada, and
see if they can help get your thinking straightened out. From
experience that is a very tough job without being face to face.
--
Robert I. Eachus
"The war on terror is a different kind of war, waged capture by capture,
cell by cell, and victory by victory. Our security is assured by our
perseverance and by our sure belief in the success of liberty." --
George W. Bush
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-23 2:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-20 16:24 Help Ada basics Ratson Janiv
2004-01-21 9:05 ` Dmitry A. Kazakov
2004-01-22 20:40 ` Mr. J.
2004-01-23 2:57 ` Robert I. Eachus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox