comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada programming with Equality, Copy and Print Functions
  2000-09-26  4:36 Ada programming with Equality, Copy and Print Functions wolfpack69
@ 2000-09-26  0:00 ` Ted Dennison
  2000-09-26  0:00 ` Samuel T. Harris
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Dennison @ 2000-09-26  0:00 UTC (permalink / raw)


In article <8qp93j$e9k$1@nnrp1.deja.com>,
  wolfpack69@my-deja.com wrote:
(code description snipped)

OK. What exactly is the problem?

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




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

* Re: Ada programming with Equality, Copy and Print Functions
  2000-09-26  4:36 Ada programming with Equality, Copy and Print Functions wolfpack69
  2000-09-26  0:00 ` Ted Dennison
@ 2000-09-26  0:00 ` Samuel T. Harris
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel T. Harris @ 2000-09-26  0:00 UTC (permalink / raw)


wolfpack69@my-deja.com wrote:
> 
> Hey, I was recommended to come here for some help with this problem i face.
> Here it is:
> 
> The stack pacakges, Static and Dynamic, provide Stack_Type as limited private
> type. Therefore i cannot use assignment or test for equality/inequality on
> objects of type stack_type in the application program. The procedures i have
> worked out below, can only operate on stack objects through the operations
> provided by the ADT package.
> 
> PROCEDURES:  procedure Equal(Stack_1 : in out Stack_Type,  Stack_2 : in out
> Stack_Type,  Stacks_equal : out Boolean);
> 
>   procedure Copy(Target_Stack : in out Stack_Type,  Source_Stack : in out
> Stack_Type);
> 
>   procedure Print_Stack(A_Stack : in out Stack_Type);
> 
> I believe these procedures are correct. I am also told that they are to work
> with both static and dynamic stacks, but only test with dynamic stack ADT.
> 
> The procedures will nned to change the state of stack(I believe this can be
> done using Pop to remove a stack item). There will also be a temporary stack
> that will be needed, where appropriate, so that the stack data can be stored
> and ensure that the stacks are returned to original state.
> 
> I hope the information is sufficient enough for you to help me with.

A classic case of a reusable component missing something.
Instead of simply adding these facilities to the component
itself, one must manhandle objects outside the component!

Oh the humanity!

-- 
Samuel T. Harris, Principal Engineer
Raytheon, Aerospace Engineering Services
"If you can make it, We can fake it!"




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

* Ada programming with Equality, Copy and Print Functions
@ 2000-09-26  4:36 wolfpack69
  2000-09-26  0:00 ` Ted Dennison
  2000-09-26  0:00 ` Samuel T. Harris
  0 siblings, 2 replies; 3+ messages in thread
From: wolfpack69 @ 2000-09-26  4:36 UTC (permalink / raw)


Hey, I was recommended to come here for some help with this problem i face.
Here it is:

The stack pacakges, Static and Dynamic, provide Stack_Type as limited private
type. Therefore i cannot use assignment or test for equality/inequality on
objects of type stack_type in the application program. The procedures i have
worked out below, can only operate on stack objects through the operations
provided by the ADT package.

PROCEDURES:  procedure Equal(Stack_1 : in out Stack_Type,  Stack_2 : in out
Stack_Type,  Stacks_equal : out Boolean);

  procedure Copy(Target_Stack : in out Stack_Type,  Source_Stack : in out
Stack_Type);

  procedure Print_Stack(A_Stack : in out Stack_Type);

I believe these procedures are correct. I am also told that they are to work
with both static and dynamic stacks, but only test with dynamic stack ADT.

The procedures will nned to change the state of stack(I believe this can be
done using Pop to remove a stack item). There will also be a temporary stack
that will be needed, where appropriate, so that the stack data can be stored
and ensure that the stacks are returned to original state.

I hope the information is sufficient enough for you to help me with.

Thanks

Adrian


Sent via Deja.com http://www.deja.com/
Before you buy.



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

end of thread, other threads:[~2000-09-26  4:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-26  4:36 Ada programming with Equality, Copy and Print Functions wolfpack69
2000-09-26  0:00 ` Ted Dennison
2000-09-26  0:00 ` Samuel T. Harris

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