comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: newbie ada question
Date: Tue, 23 Mar 2010 03:46:10 -0700 (PDT)
Date: 2010-03-23T03:46:10-07:00	[thread overview]
Message-ID: <8cb52af0-4fcf-473d-8006-eac6598b2531@h18g2000yqo.googlegroups.com> (raw)
In-Reply-To: b44c02bc-6e7c-4745-9a25-48a0a9d976ae@e1g2000yqh.googlegroups.com

An example (with GNAT you need to make 3 files out of it: lib_1.ads,
lib_2.ads, my_prog.adb) :

-- A standalone library
package Lib_1 is
  hello: String:= "Hello from library 1 !";
end;

-- Library 2 is using Library 1
with Lib_1;
package Lib_2 is
  hello: String:= Lib_1.hello;
end;

-- An application using Library 2 (and indirectly Library 1)
with Lib_2, Ada.Text_IO;
procedure My_prog is
begin
  Ada.Text_IO.Put(Lib_2.hello);
end;
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/
NB: For a direct answer, e-mail address on the following web site:
http://www.fechtenafz.ethz.ch/wm_email.htm



  parent reply	other threads:[~2010-03-23 10:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23  0:34 newbie ada question Robin
2010-03-23  7:59 ` Ludovic Brenta
2010-03-23 10:46 ` Gautier write-only [this message]
2010-05-01 21:24   ` Robin
2010-03-26 16:58 ` kug1977
replies disabled

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