🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.lang.ada
Article #47

Re: clause with

#47
From: Yannick DuchĂŞne (Hibou57)
Date: Wed, 10 Oct 2012 14:36
58 lines
3165 bytes
Le Wed, 10 Oct 2012 16:23:21 +0200, Yannick DuchĂŞne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> Le Wed, 03 Oct 2012 13:59:42 +0200, Frédéric Praca  
> <frederic.praca@free.fr> a écrit:
>
>> On Wed, 03 Oct 2012 01:54:52 -0700, philippe.torgue wrote:
>>
>>> bonjour.
>> Bonjour
>>
>>> Ă  quoi sert la clause with dans le cas suivant :
>>>
>>> main.adb :
>>> with montype;
>>> procedure main is var1 : natural := 1;
>>> .........
>>> .........
>>> end main;
>> Si on ne lit que cela, le but du with est de rendre visible les types et
>> fonctions définis dans montype.ads.
>
> Plus précisement, à rendre visible le type et ses opérateurs. Ça ne rend  
> pas visible les autres sous‑programmes.
>
> Dans le cas où on ne souhaite pas “with P; use P;”, mais seulement “with  
> P;”, si un type T est défini dans P, que P re‑défini certains opérateurs  
> standard pour T, comme l’opérateur “+”, alors faire “use P.T;” permet de  
> pouvoir écrire “x := t + t;” au lieu d’écrire un encombrant “x := P."+"  
> (t1, t2); ”.

Désolé, je n’avais bien lu. Ce que j’ai répondu est pour les “use Type”.  
C’est le nom “montype” qui m’a induit en erreur.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University
Technical Details
Message-ID: <op.wlyv6hl0ule2fv@douda-yannick>
Path: arc1-ca.pugleaf.net!q10ni65138332wif.0!nntp.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!aioe.org!.POSTED!not-for-mail
References: <4d952fa8-552e-4b34-abac-84899bfbb381@googlegroups.com> <506c28ae$0$1841$426a74cc@news.free.fr> <op.wlyvk7ceule2fv@douda-yannick>

Show Full Headers
Complete Article Headers
X-Google-Thread: 43d0c745c,69c67130386736b0
X-Google-Attributes: gid43d0c745c,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: FRENCH,UTF8
Received: by 10.180.75.197 with SMTP id e5mr3135585wiw.1.1350353778775;
        Mon, 15 Oct 2012 19:16:18 -0700 (PDT)
Path: arc1-ca.pugleaf.net!q10ni65138332wif.0!nntp.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!aioe.org!.POSTED!not-for-mail
From: Yannick DuchĂŞne (Hibou57)
 <yannick_duchene@yahoo.fr>
Newsgroups: fr.comp.lang.ada
Subject: Re: clause with
Date: Wed, 10 Oct 2012 16:36:07 +0200
Organization: Ada @ Home
Lines: 58
Message-ID: <op.wlyv6hl0ule2fv@douda-yannick>
References: <4d952fa8-552e-4b34-abac-84899bfbb381@googlegroups.com>
 <506c28ae$0$1841$426a74cc@news.free.fr> <op.wlyvk7ceule2fv@douda-yannick>
NNTP-Posting-Host: xsjFW93iF5s7HVoHhttjrg.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse@aioe.org
User-Agent: Opera Mail/12.02 (Linux)
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 2669
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: Quoted-Printable