Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!uakari.primate.wisc.edu!sdd.hp.com!think.com!paperboy!hsdndev!cmcl2!acf5!sabbagh From: sabbagh@acf5.NYU.EDU (sabbagh) Newsgroups: comp.lang.misc Subject: Re: About the variable 'I' (was Re: long names (was Readability of Ada)) Message-ID: <1590@acf5.NYU.EDU> Date: 1 May 91 14:55:48 GMT References: <3878@ssc-bee.ssc-vax.UUCP> <12394@dog.ee.lbl.gov> <1991Apr26.034205.27308@netcom.COM> Organization: New York University Lines: 43 mrs@netcom.COM (Morgan Schweers) writes: > 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... This is correct for old FORTRANs (I believe WATFOR, FORTRAN IV, etc.) i.e., that DO loop counters could only be integer variables. Also, FORTAN uses *implied typing*; you don't have to declare the types of your variables. The convention is the variable names beginning with the letters I through N are integer, all the rest are reals. This is quite out of date now since there is character, logical, complex and double precision types supported. > 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! > > 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 It should be noted that FORTRAN started out as a language for mathematicians and scientists. They are still the largest users of that language. In mathematics, letters like I,J,K, etc., are often used as subscripts (except when I is used to represent sqrt(-1)) so that is the rationale for the language design. In many ways, it is still the best language for scientific use. Hadil G. Sabbagh E-mail: sabbagh@cs.nyu.edu Voice: (212) 998-3125 Snail: Courant Institute of Math. Sci. 251 Mercer St. New York,NY 10012 "Injustice anywhere is a threat to justice everywhere." - Martin Luther King, Jr. Disclaimer: This is not a disclaimer.