|
| This Article | ||
| ||
| Share | ||
| Bibliographic References | ||
| Add to: | ||
| | ||
| Search | ||
| ||
| ASCII Text | x | ||
| Robert F. Cmelik, Narain H. Gehani, "Dimensional Analysis with C++," IEEE Software, vol. 5, no. 3, pp. 21-27, May/June, 1988. | |||
| BibTex | x | ||
| @article{ 10.1109/52.2021, author = {Robert F. Cmelik and Narain H. Gehani}, title = {Dimensional Analysis with C++}, journal ={IEEE Software}, volume = {5}, number = {3}, issn = {0740-7459}, year = {1988}, pages = {21-27}, doi = {http://doi.ieeecomputersociety.org/10.1109/52.2021}, publisher = {IEEE Computer Society}, address = {Los Alamitos, CA, USA}, } | |||
| RefWorks Procite/RefMan/Endnote | x | ||
| TY - MGZN JO - IEEE Software TI - Dimensional Analysis with C++ IS - 3 SN - 0740-7459 SP21 EP27 EPD - 21-27 A1 - Robert F. Cmelik, A1 - Narain H. Gehani, PY - 1988 KW - C++; dimensional-analysis; environment; data-abstraction; classes; C language; data structures; programming environments VL - 5 JA - IEEE Software ER - | |||
Incorporating dimensional-analysis facilities in a language lets an environment detect an additional class of errors, but at the expense of requiring a change to the language you used. However, if the language you used has suitable data-abstraction facilities, most of the benefits of dimensional analysis can be had without changing the language. To demonstrate how to get these benefits, the authors use the data-abstraction facilities of C++ to implement dimensional analysis. C++ is an upwardly compatible extension of C that provides data-abstraction facilities called classes. The authors define a set of classes that allows the writing of programs with automatic checking of units (i.e. dimensional analysis) and automatic conversion between consistent (compatible or equivalent) units. They discuss the pros and cons of this approach and compare the advantage C++ has over Ada for implementing dimensional analysis.

