From: robin on
"Alexandros Droseltis" <usenet-1(a)alex-droseltis.com> wrote in message news:7ldplbF3dfsnbU1(a)mid.individual.net...
| Thank you all for your answer. The problem is that there is not a
| function XRANF(-1) and the only thing that would make sense in the
| given context would be that
|
| HX=HINF+HM*X RANF(-1)
|
| would mean
|
| X=RANF(-1)
| HX=HINF+HM*X
|
| that is, RANF(-1) is assigned to X and then HX is computed.
|
| Could this be possible in Fortran IV?

No.


From: robin on
"glen herrmannsfeldt" <gah(a)ugcs.caltech.edu> wrote in message news:hcrn34$g1g$1(a)naig.caltech.edu...
| nmm1(a)cam.ac.uk wrote:
|
| >>> According to the documentation I have seen, user-written functions
| >>> didn't come in until Fortran II - it wasn't that they were required
| >>> to end in 'F', so much as the built-in ones did.
| (then I wrote)
|
| >>Depends on your definition of user-written.
|
| > User-written in Fortran.
|
| Yes, not until Fortran II.
|
| Though random number generators for many years were written in assembly.

For many years they were written in the same language as
the source program.
They were trivial to write, and assuming that one had a HLL,
they would be written in that same HLL and incorporated as an
ordinary function or subroutine.


From: Alexandros Droseltis on
On 2009-11-05, Erik Toussaint <user(a)example.net.invalid> wrote:
> glen herrmannsfeldt wrote:
>> Alexandros Droseltis <usenet-1(a)alex-droseltis.com> wrote:
>>
>>> I found the source of the original source code online. It is in
>>> the book is at
>>> http://books.google.com/books?id=y6lL3I0vmMwC&printsec=frontcover&dq=formalized+music#v=onepage&q=&f=false
>>
>>> The source is on pages 145-152 (jump from contents page to
>>> chapter VI and then a few pages backwards).
>>
>> Interesting. It says Fortran IV for the 7090, but it still uses
>> Fortran II style I/O statements and functions (with the trailing F).
>> (OS/360 Fortran IV supports the Fortran II I/O statements, but as
>> far as I know not the function names with the trailing F.)
>>
>> It looks like a mistake. All other references are to RANF.
>> Two statements before, a value is assignned to X, so it is possible
>> that it should be X*RANF(-1), or maybe just X or just RANF(-1).
>>
>> It might be that one could tell from the text what was expected
>> at that point.
>>
>> Note that the version on the previously mentioned web site still
>> has the X TEMP in it, presumably an undefined variable.
>>
>> -- glen
>
> I googled this book and found a site which has a pdf version for
> download. It's a different edition/pressing and the offending line of
> code here simply reads:
>
> 520 HX=HINF+HM*X

Very interesting! I searched for this and found it (Indiana University
Press), but I think that is an error as well, because 3 lines above we
read:

IF (HPR.LE.0.0) GO TO 520

Thus, if HPR <= 0 (which always is for the 1st time of the loop), then X
has no value assigned, and the assigment of HX after 3 lines
(HX=HINF+HM*X) becomes deterministic; therefore X has no meaning to be
used there. If here Xenakis did mean

520 HX=HINF+HM*RANF(-1)

then HX is distributed uniformly in [HINF, HINF+HM), as for all other
iterations of the loop, which maybe makes more sense according to the
theory of Xenakis.

HAND

Alexandros
From: Alexandros Droseltis on
On 2009-11-05, Alexandros Droseltis <usenet-1(a)alex-droseltis.com> wrote:
>
> Thus, if HPR <= 0 (which always is for the 1st time of the loop), then X
> has no value assigned, and the assigment of HX after 3 lines
> (HX=HINF+HM*X) becomes deterministic; therefore X has no meaning to be
> used there.

Here I assume that a variable with no assigned value has the value
0. Is this so for Fortran IV?

Alexandros
From: Richard Maine on
Alexandros Droseltis <usenet-1(a)alex-droseltis.com> wrote:

> On 2009-11-05, Alexandros Droseltis <usenet-1(a)alex-droseltis.com> wrote:
> >
> > Thus, if HPR <= 0 (which always is for the 1st time of the loop), then X
> > has no value assigned, and the assigment of HX after 3 lines
> > (HX=HINF+HM*X) becomes deterministic; therefore X has no meaning to be
> > used there.
>
> Here I assume that a variable with no assigned value has the value
> 0. Is this so for Fortran IV?

No. It can happen to be so for some compilers, but it is not and has not
been part of the language specification. It did used to be fairly common
for some users to code with such an assumption. But then, most people
didn't pay much attention to the language specifications or portability
in those days. If it happened to work on the particular compiler and
machine they were using, then that was all they cared about. After all,
odds were that they wouldn't see a different machine for many years, so
portability wasn't typically on the top of their mind.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain