comp.lang.ada
 help / color / mirror / Atom feed
From: sandeep parajuli <parajulisandeep.sp205168@gmail.com>
Subject: Ada stacks and the time system
Date: Sun, 15 Sep 2019 23:39:53 -0700 (PDT)
Date: 2019-09-15T23:39:53-07:00	[thread overview]
Message-ID: <8c293e09-fc74-45a4-b109-cd4041a4a311@googlegroups.com> (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


             reply	other threads:[~2019-09-16  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  6:39 sandeep parajuli [this message]
2019-09-16  8:14 ` Ada stacks and the time system Niklas Holsti
2019-09-16 16:02 ` Dennis Lee Bieber
2019-09-18 19:09 ` Ludovic Brenta
replies disabled

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