On Tue, 02 Mar 2010, Mindaugas Kavaliauskas wrote:

Hi,

> >>the following sample prints:
> >>C:\cawi32\sample\test>hbrun test194.prg
> >>ORDNAME(0), ORDKEY(0): F F
> >Looks correct for me.
> >What is the bug?
> As far as I understand zero order means no order, and should return
> an empty key and empty order name.
> Code:
>   FOR nI := 0 TO ORDCOUNT()
>     ? nI, ORDNAME(nI), ORDKEY(nI), ORDNUMBER(ORDNAME(nI))
>   NEXT
> executed before OrdCreate() prints correct result for zero order:
>          0            0
> but the same code executed after OrdListAdd() returns key 'F' for
> both zero and first index:
>          0 F F          1
>          1 F F          1

0 given as tag number in above ord*() functions means current index.
It's Clipper compatible behavior. Just test your code with Clipper.
I do no think I can change it and drop Clipper compatibility. Seems
that it may interact with existing Clipper code.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to