* Re: probleme de paquetage
[not found] <01bbfd86$4030b700$8ea6cec2@Pkonieztb>
@ 1997-01-14 0:00 ` Simon H�bert
0 siblings, 0 replies; only message in thread
From: Simon H�bert @ 1997-01-14 0:00 UTC (permalink / raw)
In article <01bbfd86$4030b700$8ea6cec2@Pkonieztb>, "konieztb"
<konieztb@worldnet.fr> wrote:
> Si vous pouviez m'expliquer comment rendre ce paquetage
> utilisable par un programme principale ce serait sympas ...
> REM : J'utilise ADA95 (gnat) sous DOS version 3.05
>
> Merci par Avance.
>
> Ci-joint le paquetage complet:
>
> -----------------------------------------------------------------------
> package VECTEURS is
> type VECTEUR is array (1..100) of INTEGER ;
> function "+"(x, y : VECTEUR) return VECTEUR ;
> function minus(x : VECTEUR) return VECTEUR ;
> function longueur(x : VECTEUR) return INTEGER ;
> procedure put(x : VECTEUR) ;
> end ;
>
Il faut tout simplement donner la visibilite du paquetage au programme
principale, avec une clause d'inclusion (with).
Donc, le fichier du programme principale contient quelque chose que
resemble:
with VECTEURS;
procedure UTILISATEUR is
function "+" ( X, Y: VECTEURS.VECTEUR ) return VECTEURS.VECTEUR
renames VECTEURS."+";
Mon_Premier_Vecteur : VECTEURS.VECTEUR := ( others => 1);
Mon_Second_Vecteur : VECTEURS.VECTEUR := ( others => 2 );
Mon_Troisieme_Vecteur : VECTEURS.VECTEUR := (others => 0);
begin
Mon_Troisieme_Vecteur := Mon_Premier_Vecteur + Mon_Deuxieme_Vecteur;
VECTEURS.PUT ( Mon_Troisieme_Vecteur );
end;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-01-14 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <01bbfd86$4030b700$8ea6cec2@Pkonieztb>
1997-01-14 0:00 ` probleme de paquetage Simon H�bert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox