Re: Kind of NOT integer constant



Hello,

glen herrmannsfeldt wrote:

<snip>

Many Fortran rules exist because of what the hardware does,
or did.  Integer division of negative numbers is one people
have been asking about for a long time.

The Fortran 66 rules regarding DO loops and array subscripts
came from the index registers on the IBM 704.  Some of
those rules are still around.

Actually, Backus has denied this explicitly.

Please see _History of Programming Languages_, pages 69-70.

The issue of limiting the number of indexes of arrays, for example,
was made to reduce the amount of address arithmetic,
not due to the number of index registers on the 704.
Backus is very firm on the point, that efficiency was the concern
rather than the 704.

The following quote is during the Q&A following Backus' talk:

<QUOTE>
[Question] "Your paper tries to dispel the legend that three subscripts
came from three index registers, and yet a later Fortran had
a seven index register machine, and therefore had seven index subscripts. What are your _current_ thoughts on how many subscripts
are needed?"


Backus: Well, I stick by my original story.  The complexity of analysis
that Bob Nelson and Irv Ziller had to do to optimally deal with indexing
and looping rose exponentially as the number of subscripts went up.
And that was, indeed, the reason we limited it to three.  The fact
that some later group decided to allow seven subscripts in a seven index
register machine-- that was out of my control.  [Laughter]
</QUOTE>

The proposed f08 allows up to 15 combined rank and co-rank.
The discussion did not mention the number of registers
in any machine.

--
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.
.



Relevant Pages

  • Re: Using unused variables
    ... I would prefer square brackets too, ... array constructors as replacements for the digraphs of. ... There are not enough symbols but one can wish that subscripts had ... I've heard other people argue that Fortran ...
    (comp.lang.fortran)
  • Re: make i:j equivalent to [(k,k=i,j)]?
    ... itself sufficient reason to add "syntactic sugar" to the language. ... and it will assign to A an array containing the integers 1 through N, ... That is what you can't do in Fortran with vector subscripts. ...
    (comp.lang.fortran)
  • Re: make i:j equivalent to [(k,k=i,j)]?
    ... Fortran, effectively does this. ... array sections. ... subscripts can be used to select the appropriate elements from ... Fortran allows for vector subscripts where a rank one array ...
    (comp.lang.fortran)
  • Re: maxloc question
    ... As far as I can tell, Fortran, at least as of 2003, has vector subscripts but not array subscripts. ... A subscript for a rank K array can be a single vector of length ...
    (comp.lang.fortran)
  • Re: Do loops until HUGE?
    ... The first machine I used that used sign-magnitude integers was an IBM 1620. ... Early Fortran compilers restricted ... In Fortran II there was the curious fact that arrays were "backwards" because the index registers subtracted their values if my recollection is not playing tricks on me. ...
    (comp.lang.fortran)