The reason for using int i in for loops

Hi Ben [and friends :slight_smile:],

Just a bit of C trivia! The reason β€˜i’ is traditionally used in a for loop is that it stands for β€œindex” which comes from the really early days of C development ala Kernighan and Ritchie

https://en.wikipedia.org/wiki/The_C_Programming_Language [which is a ref to C, not the practice of using i :slight_smile:]

Barry

Privacy & Terms