So you're refering to the FIRST page as the ZERO-th page ?
Yep, there is no better thing than zero-th page, zero-th element, zero-th index, etc.
Normally I would (I'm raised with pointers and asm, 0 is king! ) but with this I never realized that the first page should have the index 0. You ran into a bug with your code where you looped through stuff and you forgot to add 1 to the index ?
You ran into a bug with your code where you looped through stuff and you forgot to add 1 to the index ?
Indeed. Acutally I didn't forgot, I assumed it is zero based.
Anyway, this is a consistency issue but I guess even if you want to change it you would have hard time because of code that relies on it.
Yes, changing is out of the question. I did think this through though ( ), and 1-based seemed more logical to me, and it did create bugs for me as well (as page index calculations have to take into account it's 1 based but indexes are 0 based sometimes in db's (not always, sqlserver numbers start with 1)).
Yes, changing is out of the question. I did think this through though ( ), and 1-based seemed more logical to me, and it did create bugs for me as well (as page index calculations have to take into account it's 1 based but indexes are 0 based sometimes in db's (not always, sqlserver numbers start with 1)).
Is this in the manual somewhere? I had the same issue but couldn't find anything about it in the manual.
Yes, changing is out of the question. I did think this through though ( ), and 1-based seemed more logical to me, and it did create bugs for me as well (as page index calculations have to take into account it's 1 based but indexes are 0 based sometimes in db's (not always, sqlserver numbers start with 1)).
Is this in the manual somewhere? I had the same issue but couldn't find anything about it in the manual.
Reference manual -> routine you're calling. It has documentation on pageNumber and pageSize. If either one is 0 -> paging is disabled.