comp.lang.ada
 help / color / mirror / Atom feed
From: GJW3 <GJW3@bton.ac.uk>
Subject: Help.  Procedure is undefined
Date: 1998/01/08
Date: 1998-01-08T00:00:00+00:00	[thread overview]
Message-ID: <34B4C915.4BF8@bton.ac.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 130 bytes --]

Cananyone solve the problem from the code.  It says that the procedure
main is undefined in the subprograms.  Please help.
Thanks

[-- Attachment #2: main --]
[-- Type: text/plain, Size: 422 bytes --]

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;


[-- Attachment #3: eurofighter.adb --]
[-- Type: text/plain, Size: 487 bytes --]

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;

[-- Attachment #4: fighter_aircraft.adb --]
[-- Type: text/plain, Size: 344 bytes --]

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;

[-- Attachment #5: harrier.adb --]
[-- Type: text/plain, Size: 729 bytes --]

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; 

[-- Attachment #6: hawk.adb --]
[-- Type: text/plain, Size: 443 bytes --]

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;

[-- Attachment #7: helicopter.adb --]
[-- Type: text/plain, Size: 267 bytes --]

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;

[-- Attachment #8: tornado.adb --]
[-- Type: text/plain, Size: 688 bytes --]

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;

[-- Attachment #9: vstol.adb --]
[-- Type: text/plain, Size: 341 bytes --]

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;

[-- Attachment #10: wing.adb --]
[-- Type: text/plain, Size: 333 bytes --]

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;

             reply	other threads:[~1998-01-08  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-08  0:00 GJW3 [this message]
1998-01-08  0:00 ` Help. Procedure is undefined reply-address-in-sig
1998-01-08  0:00   ` David J. Fiander
1998-01-10  0:00 ` Hartmut H. Schaefer
1998-01-10  0:00   ` Nick Roberts
1998-01-12  0:00 ` John English
replies disabled

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