Page 1 of 1

OrdList() of OrdListAdd() ?

Posted: Wed Aug 11, 2021 8:54 am
by AUGE_OHR
hi,

we can use OrdListAdd() but how to get what we have add :?:
there seems no OrdList() under harbour to get Info ...

how in harbour :idea:

Re: OrdList() of OrdListAdd() ?

Posted: Wed Aug 11, 2021 10:38 am
by gfilatov
AUGE_OHR wrote: Wed Aug 11, 2021 8:54 am hi,

we can use OrdListAdd() but how to get what we have add :?:
there seems no OrdList() under harbour to get Info ...

how in harbour :idea:
Hi Jimmy,

I do it in the next approach: :arrow:

Code: Select all

  Local aTags := {}, aIndexes := {}
  Local i := 0

  WHILE !Empty( indname := ordName( ++i ) )
     AAdd( aTags, { indname, ordKey( i ), ordFor( i ) } )
  END

  IF OrdCount() > 0

    AEval( aTags, { |t| AAdd( aIndexes, t[1] ) } )

    MsgDebug( aIndexes )
  END
...
Hope that helps :idea: