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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f9b3bc80a6ea811,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-10 07:19:51 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dmytrylavrov@fsmail.net (Dmytry Lavrov) Newsgroups: comp.lang.ada Subject: Dimension checking in Ada - inpossible? In C++ it's possible using templates. Date: 10 Feb 2004 07:19:50 -0800 Organization: http://groups.google.com Message-ID: <49cbf610.0402100719.34ce7485@posting.google.com> NNTP-Posting-Host: 213.248.15.28 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1076426391 12661 127.0.0.1 (10 Feb 2004 15:19:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 10 Feb 2004 15:19:51 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:5399 Date: 2004-02-10T07:19:50-08:00 List-Id: In C++ ,it's possible to write templates that will statically check dimensions,i mean especially in physics,that x:=a*t^2/2; will be compiled and x:=a*t/2 will not. And that x:=(x^3)/(x*x);will be compiled,and x:=(x^3)/(x*x*x);will not.(i mean that it works well with arbitrary powers) I myself saw example, http://www.fnal.gov/docs/working-groups/fpcltf/html/SIunits-summary.html and also i myself saw in some forum simple dimension checker as example. It's possible to do something similar in Ada? Have no idea how. Regards, Dmytry Lavrov. (stop crossposted flamewar)