OK, this really has nothing to do with this thread but the thought of
"obvious extension" and "natural order for logicals" struck me
with an idea..
>>> They might, but they would then have features that are
>>> inappropriate, whereas MAXLOC / MINLOC are the the obvious choices
>>> for an extension.
>>
>>How? There is no natural choice for which of .true. or
>>false. is the largest. You still have difficulty understanding
>>thie simple fact. It is simple, it is a fact.
Just imagine what would have happened if block-IF were invented
before LOGICAL all those long years ago.
The arithmetic-block-IF!
IF (expression) NEGATIVE
...
ELSE IF ZERO
...
ELSE IF POSITIVE
...
END IF
A natural extension of a then existing feature..
No ambiguity in the ordering of "logical" values
(they are just numbers)..
It's no longer necessary to remember which statement label
corresponds to which condition (this is very important)..
Conditional branching based on the sign bit (obviously the best choice)
Everybody would be happy today :-)
Without LOGICALs, there would have been no funny looking relational
operators like .EQ. or .GE. (FORTRAN has long been ridiculed for this).
Later, CHARACTERs could have been introduced along with a single
comparison function ICOMPR(a,b) that returns negative, zero, or
positive depending on the character arguments being less than,
equal to, or greater than each other. This is how C did it, so even the
C community could not have claimed "C is better at string handling
than FORTRAN".. no, seriously ;-p
--
Yasuki Arasaki
[log in to unmask]
|