comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: simple programs -> one file with gps 2008 (gpl)?
Date: Fri, 08 Aug 2008 20:25:44 GMT
Date: 2008-08-08T20:25:44+00:00	[thread overview]
Message-ID: <cZ1nk.234873$TT4.220895@attbi_s22> (raw)
In-Reply-To: <6g3k63Fe28ukU1@mid.individual.net>

Marcus Lauster wrote:
> 
> I'm new to Ada and therefore I'm digging through the book "Programming 
> in Ada 2005". In Chapter 4 on Page 57 the autor states: "Complete simple 
> Programms might be presented in a single file." Furthermore he outlines 
> the structure of how such a simple program might look.

The operative word here is "might". There's not much in the ARM about source 
files or the relationship of compilation units to source files. There's nothing 
in the ARM to prevent a compiler from accepting multiple compilation units in a 
single file, but there's also nothing to require it.

GNAT, the compiler you're using, does not accept multiple compilation units in a 
single file. To ease migration of code from other compilers that do, it provides 
the gnatchop program that will break a file containing multiple compilation 
units into multiple files, each containing a single unit.

> I typed a program with similar structure into GPS 2008 (GPL) and while 
> trying to compile the GPS compiler aborted with the following message

GPS is an IDE, not a compiler. By default it uses the GNAT compiler, so no doubt 
you're using GNAT 2008.

> So my question is how to convince the underlying compiler of GPS that my 
> program is a simple program.

I'm not aware of any way to get GNAT to accept multiple compilation units in a 
single file.

-- 
Jeff Carter
"We call your door-opening request a silly thing."
Monty Python & the Holy Grail
17



  reply	other threads:[~2008-08-08 20:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 19:12 simple programs -> one file with gps 2008 (gpl)? Marcus Lauster
2008-08-08 20:25 ` Jeffrey R. Carter [this message]
2008-08-08 20:54   ` [Solved] " Marcus Lauster
2008-08-08 21:29   ` Ed Falis
2008-08-11  8:44   ` Lucretia
2008-08-08 22:44 ` amado.alves
2008-08-10 22:25   ` Robert A Duff
2008-08-12 10:21     ` amado.alves
2008-08-12 17:03       ` Simon Wright
2008-08-13 12:45         ` Stephen Leake
replies disabled

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