Move a array-item

Move a array-item

Postby byte-one » Mon Jul 16, 2018 7:37 am

Hello all!
Has anyone a function to move a array-item to a other position in this array?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Move a array-item

Postby nageswaragunupudi » Mon Jul 16, 2018 9:47 am

Code: Select all  Expand view
function ArrMoveItem( aArray, nFrom, nDest )

   local u

   u  := aArray[ nFrom ]
   ADel( aArray, nFrom )
   AIns( aArray, nDest, u )

return aArray
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Move a array-item

Postby byte-one » Sat Aug 11, 2018 10:11 am

Thanks, Mr. Rao! Works perfect.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 34 guests