> [In FORTRAN, a]ny variable whose name starts with
the letters I J K L
> M or N (alphabetic letters between I and N (which is the start of
> "INteger")) is assumed to be an int, unless you tell it otherwise.
On Wed, 4 Jan 2012, Mouse wrote:
...and others are assumed to be real.
except that it is usually FLOATING POINT. (arguably a subset of
RATIONAL numbers, where denominator must be a power of 2) I've never used
a computer where "REAL" was a REAL real number.
May seem irrelevant until you try to teach what floating point is, and why
it could matter, to students who argue, "but the manual says that it is a
REAL number!"
But is the first two letters of
"integer" where that came from? I'd always assumed it came from
mathematical convention, which uses letters i through n (often modified
with subscripts and the like) for things such as summation indices that
are most appropriately translated into programming languages as
integral types.
which I was once told was to facilitate the mnemonic of INteger to
remember that.
No idea whether there is any truth to the derivation. The guy who told me
that (mid 1960s) died in about 1980. When I started teaching, they gave
me his old desk, with lots of interesting old papers. He was a hated
curmudgeon. My favorite teacher.
Many brands of
it require giving a line number to every line.
...?? First time I've ever
heard that about any variant of FORTRAN,
even the oldest ones. Which one(s)?
Yeah, I blew that!
Somehow, I started describing BASIC in terms of FORTRAN, when I meant to
be decriving FORTRAN in terms of BASIC.
should read, "like some brands of BASIC, line numbers can beleft off of
lines that aren't explicitly referenced."