>What do folks think of using [] or {} (which are not part of the Fortran
>character set at present) to replace parentheses in cases where the
>programmer wants to tell the compiler "these parentheses are here so I
>can write in `mathematical shorthand'; you are free to convert the
>expression into something else which is mathematically equivalent and do
>not have to evaluate the expression in parentheses first"?
I'd say this was unnecessary. If you want to ensure a certain type of
behaviour you could simply write the expression as a sequence of statements
to ensure the behaviour you desired but even then optimisation may confound
your attempts! If forced use of a particular evaluation is required it would
be better set as a compiler option rather than adding features to the code.
It's bad practice to write code which may give unpredictable results e.g.
expressions which may overflow: it's better to ensure values remain within
certain ranges and then only the normal mathematical rules re brackets are
needed and the compiler can then evaluate the expression in the most
efficient way.
John
Name: John B. Macallister E-mail: [log in to unmask]
Post: Nuclear and Astrophysics Laboratory, Keble Road, Oxford OX1 3RH,UK
Phone: +44-1865-273388 (direct) 273333 (reception) 273418 (Fax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|