[fpc-pascal] Suggestions for fpspreadsheet

Travis Siegel tsiegel at softcon.com
Thu Jan 29 14:09:27 CET 2009


On Jan 29, 2009, at 6:33 AM, Michael Van Canneyt wrote:

>
>
> On Thu, 29 Jan 2009, Felipe Monteiro de Carvalho wrote:
>>
>> A doubt I am facing now is if rows and column numbers should start at
>> 1 like what is seen in most spreadsheet user interfaces or in zero
>> ..... It was zero before, but now I am changing it to 1, althougth I
>> am still not sure of the best option ... ideas?
>
> I think they should start at 0; This is customary in most code.

And here is the difference between programmers and users.
Yes, most programmer interfaces start at 0, but when a user opens your  
sreadsheet, they expect to see their first cell number as a1, not a0.
I personally always make my code 1-based, because I am not a computer,  
and nobody I know starts counting at 0, and their program interfaces  
should reflect that.
Besides, starting at 0 throws off human-made calculations.  When  
someone says how many rows aare in my spreadsheet, they'll drop to the  
bottom of the sheet, and see that it goes to h84 or c62, and just  
assume oh, that's how many rows there are.  Not so if you begin at 0.
Don't confuse the poor users, start at 1.




More information about the fpc-pascal mailing list