minus-squarelocuester@lemmy.ziptoProgramming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusivelinkfedilinkEnglisharrow-up0·edit-26 days agoI personally find it easier for non programmers to use a START:LENGTH model. 3:5 is (up to) 5 elements starting at the third. 1:1 is just the first element Any 0 is invalid 20:2 is elements 20 and 21 It eliminates inclusive/exclusive questions. linkfedilink
I personally find it easier for non programmers to use a START:LENGTH model.
3:5 is (up to) 5 elements starting at the third.
1:1 is just the first element
Any 0 is invalid
20:2 is elements 20 and 21
It eliminates inclusive/exclusive questions.