• DocumentCode
    869398
  • Title

    Dimensional analysis with C++

  • Author

    Cmelik, Robert F. ; Gehani, Narain H.

  • Author_Institution
    AT&T Bell Labs., Murray Hill, NJ, USA
  • Volume
    5
  • Issue
    3
  • fYear
    1988
  • fDate
    5/1/1988 12:00:00 AM
  • Firstpage
    21
  • Lastpage
    27
  • Abstract
    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.<>
  • Keywords
    C language; data structures; programming environments; C++; classes; data-abstraction; dimensional-analysis; environment; Documentation; Error correction; Image analysis; Law; Legal factors; Programming profession; User interfaces;
  • fLanguage
    English
  • Journal_Title
    Software, IEEE
  • Publisher
    ieee
  • ISSN
    0740-7459
  • Type

    jour

  • DOI
    10.1109/52.2021
  • Filename
    2021