comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Tasks, Entries, and Variables of a Class-wide type
Date: Mon, 1 Nov 2010 12:28:15 -0700 (PDT)
Date: 2010-11-01T12:28:15-07:00	[thread overview]
Message-ID: <958760a1-b26b-4641-be4c-b742c2e0e836@u10g2000yqk.googlegroups.com> (raw)
In-Reply-To: ian2kg$js8$1@tornado.tornevall.net

On Nov 1, 12:50 pm, Jeffrey Carter
<spam.jrcarter....@spam.not.acm.org> wrote:
> On 11/01/2010 08:30 AM, Shark8 wrote:
>
>
>
> > Crap; you're right!
> > While I certainly like the idea of having a task-construct within the
> > language itself, I'm still quite new to using them in-practice.
> > Thanks for pointing that out.
>
> Interestingly, your original problem does not exist if you use composition
> rather than type extension.
>
> --
> Jeff Carter
> "Why don't you bore a hole in yourself and let the sap run out?"
> Horse Feathers
> 49

Ah, you mean something like a Variant-record? Or am I misunderstanding
you?

Type Object_Type is ( ps_Interger, ps_Character, ps_Name [etc] );
Type PostScript_Object( Type_Discriminant : Object_Type ) is Record
  Case Type_Discriminant is
    When ps_Interger  => Integer_Value : Integer;
    When ps_Character => Character_Value : Character;
    When ps_Name      => String_Value: String; -- Not allowed,
unconstrained type
  end case;
end record;

In the above the solution of an Access_String would be unsuitable if
the parser-task was running on a separate machine [or, more
specifically/correctly, a separate address-space... FireWire networks
can have a memory map which allows devices to access one other's
memories].



  parent reply	other threads:[~2010-11-01 19:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01  5:40 Tasks, Entries, and Variables of a Class-wide type Shark8
2010-11-01  9:21 ` Dmitry A. Kazakov
2010-11-01 15:30   ` Shark8
2010-11-01 18:50     ` Jeffrey Carter
2010-11-01 19:23       ` Dmitry A. Kazakov
2010-11-01 20:08         ` Georg Bauhaus
2010-11-01 20:56           ` Dmitry A. Kazakov
2010-11-01 19:28       ` Shark8 [this message]
2010-11-01 20:49         ` Jeffrey Carter
2010-11-05 12:43         ` Robert A Duff
replies disabled

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