|
Authored by: charlie Turner on Tuesday, November 06 2012 @ 05:18 PM EST |
I remember hearing that writing an endless loop that advanced the old IBM line
printer to the beginning of a new page and then looped back to advance to the
beginning of a new page, etc. would blow a box of green bar across the room in
no time flat. Rumor has it that this would also elicit interesting reactions
from the sysop. Ah, to be a bored college student again. [ Reply to This | Parent | # ]
|
|
Authored by: IANALitj on Tuesday, November 06 2012 @ 06:52 PM EST |
Not in FORTRAN on the IBM 704 at Berkeley, but on the IBM 7090 there, probably
in FORTRAN IV in 1963, I made a slight error.
I was summing the terms of a cosine series,
1/2 + cos(x) + cos(2x) + ... + cos(nx)
with a subroutine that took as parameters n (the number of cosine terms in the
series) and x, whose multiples appeared in the series.
Unfortunately, the calling program erroneously passed a floating point number as
the value of n, to a subroutine that expected an integer. Fortran programs did
not check the validity of parameters (which could lead to fascinating bugs, but
that is another story). My error meant that the subroutine was instructed to
sum a cosine series with about ten to the thirty-ninth terms.
The result was that I generated thousands of messages warning that I had
attempted to evaluate a cosine of a number greater than 2048 or 4096 radians, or
whatever the limit was. Then, fortunately, my job was kicked off the machine.
I had exceeded the 100 or 200 page limit on the quantity of printed output for
my job.
Does this count as an error due to a single wrong line of code, the wrong
parameter in the subroutine invocation?[ Reply to This | Parent | # ]
|
|
|
|
|