Off by one solitudefed.dyne.orgimage Jaromil ( @jaromil@fed.dyne.org ) Programmer Humor@lemmy.ml • 2 months ago message-square29fedilinkarrow-up1761
arrow-up1761imageOff by one solitudefed.dyne.org Jaromil ( @jaromil@fed.dyne.org ) Programmer Humor@lemmy.ml • 2 months ago message-square29fedilink
minus-square sgibson5150 ( @sgibson5150@slrpnk.net ) linkfedilink12•2 months agoWouldn’t it be nice if documentation used the words index and offset consistently?
minus-square Zagorath ( @Zagorath@aussie.zone ) linkfedilink2•2 months agoAren’t those two the same thing? At least in C-style arrays, which might not be how they’re handled under the hood, but is at least how most languages present it to the programmer.
minus-square ReversalHatchery ( @ReversalHatchery@beehaw.org ) linkfedilinkEnglish3•2 months agoin my understanding offset is technically the “relative index”, or how much you have to go further
Wouldn’t it be nice if documentation used the words index and offset consistently?
Aren’t those two the same thing? At least in C-style arrays, which might not be how they’re handled under the hood, but is at least how most languages present it to the programmer.
in my understanding offset is technically the “relative index”, or how much you have to go further