From: Matthew Kerwin Date: 2013-01-25T15:14:51+09:00 Subject: Re: General Ruby syntax questions --047d7b33d5fc555eff04d416d8d8 Content-Type: text/plain; charset=ISO-8859-1 On 25 January 2013 16:10, Carlo E. Prelz wrote: > Subject: Re: General Ruby syntax questions > Date: Fri 25 Jan 13 02:15:09PM +0900 > > Quoting Matthew Kerwin (matthew@kerwin.net.au): > > > By convention, in most programming contexts, 'i' is often to count > > iterations of a loop. > > > > for (i = 0; i < number_of_iterations; i++) > > > > ... is pretty ubiquitous. In a nested loop, usually the inner loop uses > > 'j', and then 'k', etc. > > Comes from Fortran, where, unless otherwise specified, variables whose > names begun with the letters I to M were implicitly typed as > integers. Thus, loop indices were most commonly I, J, K, L and M. > I did not know that. Cool, thanks Carlo. -- Matthew Kerwin, B.Sc (CompSci) (Hons) http://matthew.kerwin.net.au/ ABN: 59-013-727-651 "You'll never find a programming language that frees you from the burden of clarifying your ideas." - xkcd --047d7b33d5fc555eff04d416d8d8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 25 January 2013 16:10, Carlo E. Prelz <fluido@fluido.as= > wrote:
=A0 =A0 =A0 =A0 Subject: Re: General Ruby syntax questions
=A0 =A0 =A0 =A0 Date: Fri 25 Jan 13 02:15:09PM +0900

Quoting Matthew Kerwin (matthew@ke= rwin.net.au):

> By convention, in most programming contexts, 'i' is often to c= ount
> iterations of a loop.
>
> =A0 =A0 for (i =3D 0; i < number_of_iterations; i++)
>
> ... is pretty ubiquitous. =A0In a nested loop, usually the inner loop = uses
> 'j', and then 'k', etc.

Comes from Fortran, where, unless otherwise specified, variables whos= e
names begun with the letters I to M were implicitly typed as
integers. Thus, loop indices were most commonly I, J, K, L and M.

I did not know that. Cool, thanks Carlo.
=A0
--
=A0 Matthew Kerwin, B.Sc (CompSci) (Hons) =A0 http://matt= hew.kerwin.net.au/
=A0 ABN: 59-013-727-651

=A0 "You'= ll never find a programming language that frees
=A0 you from the burden = of clarifying your ideas." - xkcd
--047d7b33d5fc555eff04d416d8d8--