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
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
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
>
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
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
> 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
> 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.
-
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-
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
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
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
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
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-
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
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
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
> 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.
---
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
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.
19 matches
Mail list logo