comp.lang.ada
 help / color / mirror / Atom feed
From: "Joao Dias" <jota.dias@clix.pt>
Subject: Re: Building with AdaGIDE
Date: Fri, 13 Feb 2004 19:16:02 -0000
Date: 2004-02-13T19:16:02+00:00	[thread overview]
Message-ID: <newscache$one1th$9km$1@newsfront4.netvisao.pt> (raw)
In-Reply-To: slrnc2pum4.ade.randhol+valid_for_reply_from_news@k-083152.nt.ntnu.no

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]



"Preben Randhol" wrote

> You say a small package. Did you also make a main program?

-------------------------------------------------------------

If I failed something like that (wich seems very likely) then

I think I am not prepared yet to start compiling examples.

I have to find time for keep reading the docu I have downloaded, cause I am
missing something (a lot actually). Although I'm very satisfied with what
I've

seen about the language implementation, so far.

My code example is that one (totoloto is some form of loto and chave is the
group of balls extracted - just forget any non-sense of the design)

I only wrote two very simple files totoloto.ads and totoloto.adb like this:

totoloto.ads

--------------------------------

package Totoloto is

Ultima_Bola : Integer := 49; --last ball number

Numero_Bolas_Chave : Integer := 7; --number of balls normally extracted

type Chave is array (1 .. 7) of Integer;

function Sorteia_Chave return Chave;

end Totoloto;

--------------------------------

totoloto.adb

--------------------------------

with Ada.Integer_Text_IO;

package body Totoloto is

Chave2: Chave;



function Sorteia_Chave return Chave is -- extracts some balls

Chave1: Chave;

begin



Chave1(1):=6;

Chave1(2):=32;

return Chave1;



end Sorteia_Chave;





begin -- I suposed that was the main progam !

Chave2:= Sorteia_Chave;

Ada.Integer_Text_Io.Put(Chave2(1),Chave2(2)); --print 2 extracted balls



end Totoloto;

------------------------------------------------

building...

"totoloto.ali" being checked ...

End of compilation

Completed sucessfully. (and nothing more)

Jo�o Dias





  reply	other threads:[~2004-02-13 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-13 16:09 Building with AdaGIDE Joao Dias
2004-02-13 16:26 ` Preben Randhol
2004-02-13 19:16   ` Joao Dias [this message]
2004-02-13 20:49     ` Robert I. Eachus
2004-02-14  9:02       ` Marin David Condic
2004-02-16 17:52         ` Joao Dias
replies disabled

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