comp.lang.ada
 help / color / mirror / Atom feed
From: dmytrylavrov@fsmail.net (Dmytry Lavrov)
Subject: Dimension checking in Ada - inpossible?  In C++ it's possible using templates.
Date: 10 Feb 2004 07:19:50 -0800
Date: 2004-02-10T07:19:50-08:00	[thread overview]
Message-ID: <49cbf610.0402100719.34ce7485@posting.google.com> (raw)

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)



             reply	other threads:[~2004-02-10 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10 15:19 Dmytry Lavrov [this message]
2004-02-10 15:42 ` Dimension checking in Ada - inpossible? In C++ it's possible using templates Preben Randhol
2004-02-10 15:43   ` Preben Randhol
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox