comp.lang.ada
 help / color / mirror / Atom feed
From: je@bton.ac.uk (John English)
Subject: Re: Help.  Procedure is undefined
Date: 1998/01/12
Date: 1998-01-12T00:00:00+00:00	[thread overview]
Message-ID: <69bnbq$68t@saturn.brighton.ac.uk> (raw)
In-Reply-To: 34B4C915.4BF8@bton.ac.uk


One of our students (GJW3@bton.ac.uk) wrote:

: Procedure Main is
: ans : integer;
: begin
: [...snip...]
: Helicopter;
: [...snip...]
: end Main;

and in another file...

: with Ada.text_io; use Ada.text_io;
: with num_io; use num_io;
: Procedure Helicopter is
: [...snip...]

1) Beware, Big Brother is watching you!
2) Try this:
   with Helicopter;    -- and other things that Main references
   procedure Main is ...

This way, the compiler knows where to look for Helicopter etc., and
it knows for sure that when you reference it, it isn't a horrible
typing mistake that would otherwise compile.

Also, try to think of a better name for the program than "Main"!

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.comp.it.bton.ac.uk/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-08  0:00 Help. Procedure is undefined GJW3
1998-01-08  0:00 ` 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 [this message]
replies disabled

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