| Re: FYI/OT: [Fwd: ANN: Units of measurement for Ada v2.7] |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: James GilesJames Giles Date: Jul 2, 2008 23:51
Arjen Markus wrote:
...
Unfortunately, most of the ones for Fortran only interpretively
keep track of units rather than enforce their use. That is, you
can't declare a variable to hold, say, only energy and have the
type system automatically detect an error if you ever try to
assign anything else to it.
The Ada method of this thread can declare such variables. That's
a considerable step forward. I think it may be possible to do it
with Fortran using parameterized types, though whether you can
do it with KIND parameters or only with non-KIND parameters
(or even, for sure, at all) I can't tell without an implementation
and some time to play with it.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."
-- C. A. R. Hoare
"Simplicity is prerequisite for reliability" -- E. W. Dijkstra
|