From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!j19g2000prh.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Properties Date: Thu, 2 Dec 2010 21:00:41 -0800 (PST) Organization: http://groups.google.com Message-ID: <18f98563-340c-4bc2-83e5-8d1187f92165@j19g2000prh.googlegroups.com> References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <1u5dftkqqi68c.10079qnqyyfwb$.dlg@40tude.net> <15tv4yga36dpi$.1hc09dlbgcmqe.dlg@40tude.net> <18768dde-5817-40b9-aaa1-03c620ad7187@i32g2000pri.googlegroups.com> NNTP-Posting-Host: 174.28.198.93 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1291352441 11626 127.0.0.1 (3 Dec 2010 05:00:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 3 Dec 2010 05:00:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j19g2000prh.googlegroups.com; posting-host=174.28.198.93; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16737 Date: 2010-12-02T21:00:41-08:00 List-Id: On Dec 2, 2:57=A0am, Maciej Sobczak wrote: > >Wrong (AARM Annex A, 3.a): > >"simultaneous calls to Text_IO.Put will work properly, so long >as they are going to two different files. On the other hand, >simultaneous output to the same file constitutes erroneous use >of shared variables." > -- > Maciej Sobczak *http://www.inspirel.com Er, then does that mean that the following is wrong? Procedure Top is F : Ada.Text_IO.File_Type; I : Integer:=3D Positive'First; Task Type Writer(ID : Integer) is end Writer; Task Body Writer is begin -- Write the ID to the file. Ada.Text_IO.Put( Integer'Image(ID) ); end Writer; Function Make_Task Return Writer is begin -- Make unique ID tasks. Return Result : Writer(ID =3D> I) do I:=3D I + 1; end return; end Make_Task; Type Task_Array is Array (1..20) of Access Writer; Tasks : Task_Array:=3D ( 1..20 =3D> New Writer'(Make_Task) ); begin Null; -- Everything happens by MAGIC! end top;