From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd0de980b22e8253,start X-Google-Attributes: gid103376,public From: GJW3 Subject: Help. Procedure is undefined Date: 1998/01/08 Message-ID: <34B4C915.4BF8@bton.ac.uk> X-Deja-AN: 313964564 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------681674BA4851" Organization: University of Brighton Newsgroups: comp.lang.ada Date: 1998-01-08T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------681674BA4851 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cananyone solve the problem from the code. It says that the procedure main is undefined in the subprograms. Please help. Thanks --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="main" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="main" Procedure Main is ans : integer; begin PUT_line("Welcome to Gareth's British Military Aircraft Identification Program"); PUT_line("Please choose an option"); PUT_line("1. Transport Plane"); PUT_line("2. Fighter Aircraft"); PUT_line("3. Helicopter"); PUT_line("4. Quit"); Get (ans); new_line; IF ans = 1 Then Transport; Elsif ans = 2 Then Fighter; Elsif ans = 3 Then Helicopter; Elsif ans = 4 Then Quit; End if; end Main; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="eurofighter.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eurofighter.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; Procedure Eurofighter is onee : integer; begin PUT_line("The Eurofighter 2000 is a joint European aircraft under construction by the UK, Germany, Italy and Spain."); PUT_line("It is a Delta Canard with the main wing at the rear of the plane."); PUT_line("It is a single seater with a large weapon store."); PUT_line("Press 1 to return to the Main Menu"); get (onee); new_line; If onee = 1 Then Main; End if; End Eurofighter; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="fighter_aircraft.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fighter_aircraft.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; with wing; with vstol; Procedure Fighter_Aircraft is ansf : integer; begin PUT_line("How many engines did the plane have?"); PUT_line("1. One engine"); PUT_line("2. Two engines"); Get (ansf); new_line; If ansf = 1 Then VSTOL; Elsif ansf = 2 then Wing; End if; End Fighter_Aircraft; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="harrier.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="harrier.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; Procedure Harrier is oneh : integer; begin PUT_line("The Harrier is the most famous British aircraft in service. Produced by Hawker Siddely and then British Aerospace"); PUT_line(" the Harrier is a VSTOL capable aircraft. This means that it can take off and land vertically and in short spaces"); PUT_line("due to its Rolls Royce Pegasus engine being ducted through 4 nozzles on the planes sides. The Harrier is subsonic"); PUT_line("and has an amazing weapon capability. Produced by McDonnell Douglas in the US under licence for the US Navy."); PUT_line("Press one to return to the Main Menu"); get (oneh); new_line; If oneh = 1 Then Main; End if; End Harrier; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="hawk.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hawk.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; Procedure Hawk is onek : integer; begin PUT_line("The BAe Hawk is a small trainer which has been adapted to be an air defence fighter and attack craft."); PUT_line("The Hawk is subsonic and has only basic controls. It is the plane used by the Red Arrows display team."); PUT_line("Press 1 to return to the Main Menu"); get (onek); new_line; If onek = 1 Then Main; End if; End Hawk; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="helicopter.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="helicopter.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; Procedure Helicopter is oner : integer; begin PUT_line("Try a more specialised program"); PUT_line("Press 1 to return to the Main Menu"); get (oner); new_line; If oner = 1 Then Main; End if; End Helicopter; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="tornado.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tornado.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; Procedure Tornado is onet : integer; begin PUT_line("The Tornado is built by the joint European Panavia company. It is a twin seater with a weapons officer/navigator "); PUT_line("and pilot. It comes in two versions: the ground attack and the air defence variant."); PUT_line("The Tornado has a swing wing which moves according to speed and angle of flight. It has a top speed of Mach 2 and"); PUT_line(" can carry 8 weapons as well as its cannon and two drop tanks for extra range. A formidible fighter."); PUT_line("Press 1 to return to the Main Menu."); get (onet); new_line; If onet = 1 Then Main; End if; End Tornado; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="vstol.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vstol.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; with Harrier; with Hawk; Procedure VSTOL is ansvstol : integer; begin PUT_line("Is the plane Vertical Take Off and Landing capable?"); PUT_line("1. Yes"); PUT_line("2. No"); Get (ansvstol); new_line; If ansvstol = 1 Then Harrier; Elsif ansvstol = 2 then Hawk; End if; End VSTOL; --------------681674BA4851 Content-Type: text/plain; charset=us-ascii; name="wing.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wing.adb" with Ada.text_io; use Ada.text_io; with num_io; use num_io; with Eurofighter; with Tornado; Procedure Wing is answ : integer; begin PUT_line("What type of Wing does it have?"); PUT_line("1. Canard"); PUT_line("2. MRVR Swing wing"); Get (answ); new_line; If answ = 1 Then Eurofighter; Elsif answ = 2 then Tornado; End if; End Wing; --------------681674BA4851--