[fpc-pascal] Suggestions for fpspreadsheet

Michael Van Canneyt michael at freepascal.org
Thu Jan 29 14:28:16 CET 2009



On Thu, 29 Jan 2009, Graeme Geldenhuys wrote:

> On Thu, Jan 29, 2009 at 3:09 PM, Travis Siegel <tsiegel at softcon.com> wrote:
> > 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.
> 
> I fully agree. So to add to my previous reply.  Internally (for the
> developers), use 0-based counting. But when things are displayed
> visually to the _user_ i would definitely display the first row as 1.
> 
> That means all internal RTL container classes including your component
> uses 0-based counting. Only the painting gets done as 1-based
> counting.

For me this is so self-evident, that I didn't even bother to write it :(

I was only making a statement as to how it is coded. 

Display to the user must obviously be 1 and A based.

Michael.



More information about the fpc-pascal mailing list