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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,ec7fc30600a974ce X-Google-Attributes: gid103376,public From: "Pascal Obry" Subject: Re: Programming for the World in Ada95 Date: 2000/02/16 Message-ID: <88esr7$nff$1@wanadoo.fr>#1/1 X-Deja-AN: 586633510 References: <38A83838.44A43A7D@res.raytheon.com> <88b4oa$ljt$1@wanadoo.fr> <38A99E37.F355452C@quadruscorp.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 950728359 24047 193.250.167.160 (16 Feb 2000 19:12:39 GMT) Organization: home NNTP-Posting-Date: 16 Feb 2000 19:12:39 GMT Newsgroups: comp.lang.ada Date: 2000-02-16T19:12:39+00:00 List-Id: Ray Blaak a �crit dans le message ... >The fix is, of course, named placement holders: > >"there are ${total_count} bad things here, ${critical_count} of which matter" > And what about: function Critical_Error (Total_Count, Critical_Count : in Positive) return String is begin return "there are" & Positive'Image (Total_Count) & " bad things here," & Positive'Image (Critical_Count) & " of which matter"; end Critical_Error; Now there is no problem with reordering :) For a multi-lingual error system a OO design will do as in: type Error_Message is abstract tagged private; function Critical_Error (E : Error_Message; Total_Count, Critical_Count : in Positive) return string is abstract; type English_EM is new Error_Message with private; function Critical_Error (E : English_EM; Total_Count, Critical_Count : in Positive) return string is abstract; type French_EM is new Error_Message with private; function Critical_Error (E : French_EM; Total_Count, Critical_Count : in Positive) return string is abstract; Pascal. PS : this code has not been check by any compiler except myself so it could just not compile :) --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination"