* Dimension checking in Ada - inpossible? In C++ it's possible using templates. @ 2004-02-10 15:19 Dmytry Lavrov 2004-02-10 15:42 ` Preben Randhol 0 siblings, 1 reply; 3+ messages in thread From: Dmytry Lavrov @ 2004-02-10 15:19 UTC (permalink / 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) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dimension checking in Ada - inpossible? In C++ it's possible using templates. 2004-02-10 15:19 Dimension checking in Ada - inpossible? In C++ it's possible using templates Dmytry Lavrov @ 2004-02-10 15:42 ` Preben Randhol 2004-02-10 15:43 ` Preben Randhol 0 siblings, 1 reply; 3+ messages in thread From: Preben Randhol @ 2004-02-10 15:42 UTC (permalink / raw) On 2004-02-10, Dmytry Lavrov <dmytrylavrov@fsmail.net> wrote: > It's possible to do something similar in Ada? Have no idea how. http://home.t-online.de/home/Christ-Usch.Grein/Ada/SI.html -- "Saving keystrokes is the job of the text editor, not the programming language." ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dimension checking in Ada - inpossible? In C++ it's possible using templates. 2004-02-10 15:42 ` Preben Randhol @ 2004-02-10 15:43 ` Preben Randhol 0 siblings, 0 replies; 3+ messages in thread From: Preben Randhol @ 2004-02-10 15:43 UTC (permalink / raw) On 2004-02-10, Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> wrote: > On 2004-02-10, Dmytry Lavrov <dmytrylavrov@fsmail.net> wrote: >> It's possible to do something similar in Ada? Have no idea how. > > http://home.t-online.de/home/Christ-Usch.Grein/Ada/SI.html and http://home.t-online.de/home/Christ-Usch.Grein/Ada/Dimension.html -- "Saving keystrokes is the job of the text editor, not the programming language." ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-10 15:43 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-02-10 15:19 Dimension checking in Ada - inpossible? In C++ it's possible using templates Dmytry Lavrov 2004-02-10 15:42 ` Preben Randhol 2004-02-10 15:43 ` Preben Randhol
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox