𝔻𝔼𝕍𝕀𝕃𝕀𝕊ℍ@lemmy.worldBanned from community to Programmer Humor@lemmy.ml · 2 年前Aaargh....my eyes......my eyes......lemmy.worldimagemessage-square95linkfedilinkarrow-up1621arrow-down112
arrow-up1609arrow-down1imageAaargh....my eyes......my eyes......lemmy.world𝔻𝔼𝕍𝕀𝕃𝕀𝕊ℍ@lemmy.worldBanned from community to Programmer Humor@lemmy.ml · 2 年前message-square95linkfedilink
minus-squareRogueBanana@lemmy.ziplinkfedilinkEnglisharrow-up73arrow-down2·2 年前I would take this over int a; anyday
minus-squareRogueBanana@lemmy.ziplinkfedilinkEnglisharrow-up27·2 年前Cmon now its illegal to use them anywhere other than iterators
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up4·2 年前I sometimes use n as my loop variable (⌐■_■)
minus-squareSorryQuick@lemmy.calinkfedilinkarrow-up2·2 年前n is genrally the max though. “From i=0 to n” is used in math all the time.
minus-squareSorryQuick@lemmy.calinkfedilinkarrow-up1·2 年前Which is fine, only it might confuse whoever then has to maintain your code.
minus-squareIronfacebuster@lemmy.worldlinkfedilinkarrow-up18·2 年前int IntegerThatWillBeUsedToIterateOverAListOfItemsAndModifyThem2
I would take this over int a; anyday
Amateur! Ints should be called i, j or k.
Cmon now its illegal to use them anywhere other than iterators
I sometimes use
nas my loop variable (⌐■_■)n is genrally the max though. “From i=0 to n” is used in math all the time.
Not in my code
Which is fine, only it might confuse whoever then has to maintain your code.
This is the way
int IntegerThatWillBeUsedToIterateOverAListOfItemsAndModifyThem2