From: Richard Maine on
glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote:

> Richard Maine <nospam(a)see.signature> wrote:
> > jfh <john.harper(a)vuw.ac.nz> wrote:
>
> >> It is standard f66, in section 7.2.1.1. The thing that surprised me
> >> about f66 arrays when I looked up the standard was 5.1.3.3, which says
> >> a subscript expression must be written as one of these constructs:

> > To me, a much more "interesting" oddity that I recall here was
> > than n+1 was ok, but 1+n was not.
>
> Yes, but it is usual in algebra to write constant*variable, and
> also usual to order in decreasing powers of the variable.

And subscript expressions are naturally related to algebra and
polynomials? Undoubtedly there is at least a distant relationship,
perhaps closer in special cases, but I don't see a particularly close
one in general.

I'll claim that a form like the sum of a constant and a variable for an
array index value is reasonably often a base and an offset, with the
constant being the base and the variable being the offset. I find it far
more natural to write base+offset than offset+base.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: glen herrmannsfeldt on
Richard Maine <nospam(a)see.signature> wrote:
(snip, someone wrote)

>> > To me, a much more "interesting" oddity that I recall here was
>> > than n+1 was ok, but 1+n was not.

>> Yes, but it is usual in algebra to write constant*variable, and
>> also usual to order in decreasing powers of the variable.

> And subscript expressions are naturally related to algebra and
> polynomials? Undoubtedly there is at least a distant relationship,
> perhaps closer in special cases, but I don't see a particularly close
> one in general.

Well, it is supposed to be FORmula TRANslation, which I might
have thought meant algebraic formulae.

But then anohter possibility is that it is related to the index
registers on the 704. Some of the DO features, I believe, were
designed around those registers.

> I'll claim that a form like the sum of a constant and a variable for an
> array index value is reasonably often a base and an offset, with the
> constant being the base and the variable being the offset. I find it far
> more natural to write base+offset than offset+base.

Hmm. I don't know 704 assembler, but for S/360 assembler
it is offset(base) or offset(index,base). But then I don't know
if it was designed around computer scientists doing assembly
programming, or physical scientists doing algebra.

I would guess that you have done more algebra than assembly
programming.

-- glen