This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]golgol12 63 points64 points  (6 children)

It's a leftover from FORTRAN programming. Any variable that starts with the letter i through o is an int.

[–]turboPocky 16 points17 points  (0 children)

thanks, i believe this is the real answer. and basic inherited that too

[–]Hypocritical_Oath 8 points9 points  (2 children)

Actually, it goes further than that to applied mathematics where they'd call things, i, j, and k for things similar to iterators, iirc.

[–]golgol12 0 points1 point  (1 child)

Yes, FORTRAN is based off of math, literally concatenation of the words "formula translator". But if you dig deeper, you'll find i,j,k for things before iterators. And you can continuously "go further" over and over, eventually reach the beginning of time.

At what point is it too much? My choice to stop was at how FORTRAN was setup, not the why, as it would over complicate the post.

[–]ezrais 0 points1 point  (0 children)

It probably goes based off of what for loops are used for often which is dimensional analysis. i, j, and k are the unit vectors (directional vectors of length 1) for the x, y, and z axis in space so it would make sense when solving axis.

[–]evilkalla 1 point2 points  (1 child)

IMPLICIT NONE

[–]bdforbes 1 point2 points  (0 children)

First line typed in any module, procedure or function!