Maenner Pascal extensions(ID:8024/)Pascal extended for physical quantitiesSet of extensions to Pascal (after the fashion of extended Ada types) proposed by Männer 19886 Physical Institute, University of Heidelberg, F.R. Germany to enable the recording of physical quantities. References: Summary In this paper, an extension of high level languages like PASCAL has been proposed that allows the declaration of physical dimensions and units for constants, variables and functions. The basic idea behind the proposal was discussed, and examples for applications were given demonstrating the usefulness of the new constructs. It was shown that several additional types of compilation time checks will be possible, and that programming will be saver by the possibility of choosing the scale for literal constants locally. In some circumstances, the ability to enforce the internal representation of a quantity in a certain unit might be an additional benefit of the proposed syntax extension. The new syntactic elements were described in a graph representation. An implementation was suggested which restricts the necessary syntax modifications as far as possible with the additional effect to enforce the programmer to assign meaningful ranges to variables and function results. in SIGPLAN Notices 21(03) March 1986 view details |