comp.lang.ada
 help / color / mirror / Atom feed
* Ada stacks and the time system
@ 2019-09-16  6:39 sandeep parajuli
  2019-09-16  8:14 ` Niklas Holsti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sandeep parajuli @ 2019-09-16  6:39 UTC (permalink / raw)


Emperor Constantine has commanded Darth Vader to build and operate a warship repair facility for Tie Fighters and Star Destroyers.  When a damaged vehicle arrives a service record must be placed in the appropriate service bay including the vehicles name and time of arrival.  For security reasons, Tie fighters are assigned names of TieA, TieB etcetera.  Likewise, Star Destroyers are given names of StarA, StarB etcetera.  After a vehicles name ends in ‘Z’ the sequence is repeated from ‘A’.  Lord Vader directed us to write a program for the facility providing support for two stacks or parish in the attempt.  To minimize waste, the two stacks must occupy the same physical space, for example locations 1 through 20 for the “C” Option.  The stack space must be allocated dynamically in the stack, not the heap (Box1.ada)!  You must prompt the user at run time for the upper and lower array bounds.  For the “C” option use 1 and 20 as the lower and upper bounds for the actual space used to track vehicles, i.e., the stack space will hold a maximum of 20 space vehicles.  The following memory model was specified by Lord Vader using 1 and 20 for the lower and upper bounds respectively.

How can we do this is Ada


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

end of thread, other threads:[~2019-09-18 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16  6:39 Ada stacks and the time system sandeep parajuli
2019-09-16  8:14 ` Niklas Holsti
2019-09-16 16:02 ` Dennis Lee Bieber
2019-09-18 19:09 ` Ludovic Brenta

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