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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5e54ec0ce937978 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!l77g2000hsb.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: String literals and wide_string literals - how? Date: 20 Apr 2007 13:01:00 -0700 Organization: http://groups.google.com Message-ID: <1177099260.665252.323030@l77g2000hsb.googlegroups.com> References: <1177063665.093083.241580@e65g2000hsc.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1177099261 10784 127.0.0.1 (20 Apr 2007 20:01:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Apr 2007 20:01:01 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l77g2000hsb.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:15170 Date: 2007-04-20T13:01:00-07:00 List-Id: On Apr 20, 12:16 pm, "Randy Brukardt" wrote: > Now throw in some operator overloading: > > function "+" (Left, Right : Roman_Numeral) return Roman_Numeral; > > and you can work solely in Roman_Numerals. It would be an interesting challenge to write this function---without cheating. That is, without resorting to converting the operands to regular integers, adding them the normal way, and converting the result back. No, no, no. Do it the way the Romans would have had to do it. Might make for a good programming exercise. And then, if someone gets this right, tell them to implement "*". > Total : constant Roman_Numeral := Claw_Generic_Price + > Claw_Support_Price; > > Cool, even if rather useless. (I don't think I'd want to try to calculate > sales tax this way!!) Given that a lot of people had to calculate a lot of taxes this past week, I'm sure they're all thankful that they didn't have to fill out Form MXL this way. -- Adam