Article View: comp.lang.misc
Article #3680About the variable 'I' (was Re: long names (was Readability of Ada))
From: Morgan Schweers
Date: Fri, 26 Apr 1991 03:42
Date: Fri, 26 Apr 1991 03:42
33 lines
2104 bytes
2104 bytes
Greetings,
Can someone confirm (preferably in a post, so my MBX doesn't flood)
the truth/falsity of FORTRAN being the starter of 'I' as a generic loop
variable?
I learned to program when I was really young, and I got used to using
FOR I=1 TO 100, and such, from reading sample programs. I still use
'I' as a generic loop variable, and the funny thing is... ALMOST EVERYONE
I KNOW DOES TOO. I first realized in HS that the teacher and everyone in
the class was using 'I' as the loop variable. It almost never had any
other meaning.
Then when I finally took FORTRAN, I discovered a possible reason. I've
never seen it documented anywhere, so I was wondering if my conjecture was
right. Any opinions? (*IF* you are lucky enough not to have programmed
in FORTRAN at any time, it's loops were only allowed to be done with
INTEGER variables, and it's INTEGERS were hardcoded. I believe 'I' was
the first integer, tho I don't remember too well after some 6+ years...
It's interesting to note, also, that the standard structure that I've
seen people go through is 'I', then 'J', then ofttimes to 'T'. Why?
I dunno! <Grin>
As for the person who screamed about 'C' programmers using 'i' in for
loops, I've found that it makes it Real Clear(tm) that that is nothing more
than an incremental loop counter.
-- Morgan Schweers
+-----
Yeah, my programs for my boss have 'for(i' in them, what about it? ;-)
-- mrs@netcom.com
-----+
Technical Details
Message-ID:
<1991Apr26.034205.27308@netcom.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!voder!pyramid!octopus!vsi1!daver!dlb!netcomsv!mrsReferences:
<3878@ssc-bee.ssc-vax.UUCP> <jls.672366979@rutabaga> <12394@dog.ee.lbl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!voder!pyramid!octopus!vsi1!daver!dlb!netcomsv!mrs From: mrs@netcom.COM (Morgan Schweers) Newsgroups: comp.lang.misc Subject: About the variable 'I' (was Re: long names (was Readability of Ada)) Message-ID: <1991Apr26.034205.27308@netcom.COM> Date: 26 Apr 91 03:42:05 GMT References: <3878@ssc-bee.ssc-vax.UUCP> <jls.672366979@rutabaga> <12394@dog.ee.lbl.gov> Organization: McAfee Associates Lines: 33