comp.lang.ada
 help / color / mirror / Atom feed
* Please help a newbie with Booch/Ada.
@ 1998-08-20  0:00 Lengyel Sandor
  1998-08-21  0:00 ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Lengyel Sandor @ 1998-08-20  0:00 UTC (permalink / raw)


I am fooling around with the Booch components, since I think
"Collections" are very usefull.

I tried out Single_List. It works fine for a data = Character.

I tried to make it work for string.

First I generated a string_references.ads as follows:

   PACKAGE String_References IS
      TYPE String_ptr IS ACCESS ALL String;
      TYPE Const_String_Ptr IS ACCESS CONSTANT String;
   END String_References;


Then I created a root_string_container.ads as:

   with Bc.Containers;
   with String_References;
   package Root_String_Container is new Bc.Containers
      (String,String_References.String_ptr);


(Coping the format of root_container.ads. :-) )

When I run a semanric check on this later code, I get the following
message.

root_string_container.ads:4:08: actual for "Item" must be a definite
subtype.


?? What does it mean !definite! subtype.
Why Character fulfills this requirement but String does not.
Where in the literature can I find explanations for these messages. The
expression "definite subtype" is not in my Ada book. (Subtype of course
is.)

How can one make Booch work for Strings?

Thanks.

-- 
 Lengyel Sándor

Hass, alkoss, gyarapits,
S a haza fényre derül. (Kölcsey)




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-09-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-20  0:00 Please help a newbie with Booch/Ada Lengyel Sandor
1998-08-21  0:00 ` Stephen Leake
1998-08-21  0:00   ` Lengyel Sandor
1998-08-27  0:00   ` Simon Wright
1998-08-30  0:00   ` Matthew Heaney
1998-09-01  0:00     ` Brian Rogoff

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