FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ASCAN reverse ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
ASCAN reverse ?
Posted: Wed May 17, 2023 01:54 PM
hi,

i have a (short) Array where i want to find a Item but must start at End of Array a search backward

is there a Way to use ASCAN() "reverse" :?:
greeting,

Jimmy
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: ASCAN reverse ?
Posted: Wed May 17, 2023 02:13 PM
Hi Jimmy,

just use RAscan() :wink:

// The example demonstrates the difference between AScan() and RAscan().

PROCEDURE Main()
LOCAL aArray := { "A", 1, Date(), 1, .F. }

? Ascan( aArray, 1 ) // result: 2
? RAScan( aArray, 1 ) // result: 4

RETURN


Regards, Detlef
p.s. du wohnst in Hamburg?
Das ist nicht weit von mir. Vielleicht könnten wir uns austauschen?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: ASCAN reverse ?
Posted: Wed May 17, 2023 02:17 PM
hi Detlef,
Detlef wrote:just use RAscan() :wink:
so easy, thx
Detlef wrote: p.s. du wohnst in Hamburg?
Das ist nicht weit von mir. Vielleicht könnten wir uns austauschen?
JA
schreibe mir doch bitte eine private Message mit Email Adresse dann kann ich dir antworten.
AUGE_OHR AT WEB.DE
greeting,

Jimmy

Continue the discussion