Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-14 Thread Sieghard
Hallo Martin, Du schriebst am Sat, 14 Apr 2012 10:26:08 +0200: > > former Borland. I prefer _safe_ string handling, and it's been fast > > enough for my purposes everytime in the past. > > Agreed. And if Pascal string index would be zero based such C-style > tricks would not be necessary. Anyway

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-14 Thread Martin Schreiber
On Friday 13 April 2012 23:51:12 Sieghard wrote: > > countless. And often I switch to the C-notation (pchar(pointer > > ()) [index]) because of performance and convenience > > reasons. > > Yes, that's exactly the opposite of my style. I prefer the "Pascal" way, as > introduced by UCSD Pascal and ge

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-13 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 13 Apr 2012 08:10:15 +0200: > > That's nonsense. Implemented correctly, _any_ index base gives identical > > speed - you _don't_ implement it using offset calculation from the first ... > You probably should have a look into the disassembler listings of your >

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-12 Thread Martin Schreiber
On Friday 13 April 2012 00:05:07 Sieghard wrote: > > That's nonsense. Implemented correctly, _any_ index base gives identical > speed - you _don't_ implement it using offset calculation from the first > _existing_ element, but instead, you calculate the offset from a "virtual" > element correspondi

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-12 Thread Sieghard
Hallo Martin, Du schriebst am Thu, 12 Apr 2012 07:22:32 +0200: > > > MSEgui datasets have a null-based recno already > > > (controller.recnonullbased). > > > > Your tribute to C, I guess. > > I think indexing null or one based should be consistent in a programming Yes, for sure - it should be

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-12 Thread IvankoB
> counting numbers are called "cardinal", while numbering numbers (;) are > called "ordinal". In FPC, the "cardinal" is >=0 (can really be counted on fingers) with twice as higher upper bound. -- For Developers, A Lot

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-12 Thread IvankoB
> How do you number things? Me guess the best solution is that won't enforce referencing docs & sources whether 0 or 1 :) That's once established system for every case. If 90% is zero based then the remaining 10% should also turn into zero based. -

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 21:42:13 Sieghard wrote: > Hallo Martin, > > Du schriebst am Wed, 11 Apr 2012 10:40:40 +0200: > > All indexes in FPC dynamic arrays are null-based, TList indexes are null > > based, direct data access in tmsebufdataset is null-based. BTW, do you > > Which are direct take-

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Martin, Du schriebst am Wed, 11 Apr 2012 09:09:42 +0200: > BTW, I don't like the one-based FPC recno, I think it should be > zero-based. What do you think? That's the distinction between _counting_ and _numbering_. Do you count "0, 1, 2..."? Probabely not. How do you number things? Doesn't

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Julio, Du schriebst am Wed, 11 Apr 2012 10:23:37 +0200: > Array concept zero-based? not in objectpascal. Right. Array indeices are based on whatever value the implementor decides on. > I know there are lots of arguments about starting in 0 or 1 or whatever As is always the case when the

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Martin, Du schriebst am Wed, 11 Apr 2012 10:40:40 +0200: > All indexes in FPC dynamic arrays are null-based, TList indexes are null > based, direct data access in tmsebufdataset is null-based. BTW, do you Which are direct take-overs from C. > I assume one-based recno is a relict from Bor

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
I have found this link where there is a talk about it. http://www.mail-archive.com/lazarus@miraclec.com/msg06970.html 2012/4/11 Graeme Geldenhuys > On 11 April 2012 10:40, Martin Schreiber wrote: > > > > All indexes in FPC dynamic arrays are null-based, TList indexes are null > > based, direct

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Graeme Geldenhuys
On 11 April 2012 10:40, Martin Schreiber wrote: > > All indexes in FPC dynamic arrays are null-based, TList indexes are null > based, direct data access in tmsebufdataset is null-based. BTW, do you know > tmsebufdataset.currentas* property?. > I assume one-based recno is a relict from Borland-BDE-

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
Probably there is a mix of concepts. When I read recno I understand item so first item is 1, second is 2.. Another thing is offset, in this case first element has offset 0, second 1 That's the main reason I understand for recno first element=1 If you rename it as recoffset then it's ok start

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 10:23:37 Julio Jiménez wrote: > Hi. > > Array concept zero-based? not in objectpascal. > > Why the first element must be 0? You usually think first=1, second=2 > first=0? > All indexes in FPC dynamic arrays are null-based, TList indexes are null based, direct data ac

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
Hi. Array concept zero-based? not in objectpascal. Why the first element must be 0? You usually think first=1, second=2 first=0? I know there are lots of arguments about starting in 0 or 1 or whatever and I don't want to start a 'war' because it.. My point of view is to follow fpc/fcl direct

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread wahono sri
> Changed in git master e8f1d49de2fc18b898d662cd19a4b2cf3ada3a1e, thanks. > BTW, I don't like the one-based FPC recno, I think it should be zero-based. > What do you think? > I think zero-based is OK such as array concept. ---

Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 08:54:18 wahono sri wrote: > At line 5432 : > > if int1 > 0 then begin > > it should be : > > if int1 >= 0 then begin > > Because it always ignore first row. > Changed in git master e8f1d49de2fc18b898d662cd19a4b2cf3ada3a1e, thanks. BTW, I don't like the one-based FPC recn

[MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-10 Thread wahono sri
At line 5432 : if int1 > 0 then begin it should be : if int1 >= 0 then begin Because it always ignore first row. Thanks -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications.