drlava Posted July 19, 2007 Share Posted July 19, 2007 Is there an efficient way of copying a whole array subset without using loops? Say I have an array; Dim $array[5][2000] I want to copy the fith set of the first dimension to the fourth set: $array[4]=$array[5] or in matlab-like style, $array(4,=$array(5, without doing: for $i=0 to 1999 $array[4][$i]=$array[5][$i] next thanks of you have the solution. Link to comment Share on other sites More sharing options...
randallc Posted July 19, 2007 Share Posted July 19, 2007 Hi,; no! But if you are asking "has it been done" to be more efficient?; maybe; my link in sig gives a vbs option which may be faster for big arrays; so you get _ArraySwap2D($ar_FileReadArray2D,4, 5)oÝ÷ Ù«¢+Ø¥¹±Õ±ÐíÉÉäɹÔÌÐì)1½°ÀÌØíÑ¥µÄôQ¥µÉ%¹¥Ð ¤°ÀÌØíÉ}¥±IÉÉä°ÀÌØíÍ¥±¹µôMÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈí¹ÍÝÉ¥¹1¥¹ÍàȹÑáÐÅÕ½Ðì(ÀÌØíÉ}¥±IÉÉäôMÑÉ¥¹MÁ±¥Ð¡¥±I ÀÌØíÍ¥±¹µ¤° H¤)1½°ÀÌØíÉ}¥±IÉÉäÉô}ÉÉäÉ ÉÑɽµÉÉåMÐ ÀÌØíÉ}¥±IÉÉä°Ä°À°ÅÕ½ÐíðÅÕ½Ðì¤(ìͼ¥å½Ô¡Ù±ÉäÉÉÉä°ÀÌØíÉ}¥±IÉÉäÉÑ¡¸ì)}ÉÉå¥ÍÁ±ä ÀÌØíÉ}¥±IÉÉäÉ°ÅÕ½ÐíÐÍÝÀÅÕ½Ðì¤)}ÉÉåMÝÀÉ ÀÌØíÉ}¥±IÉÉäɰаԤ)}ÉÉå¥ÍÁ±ä ÀÌØíÉ}¥±IÉÉäÉ°ÅÕ½ÐíÐÍÝÀÅÕ½Ðì¤)Õ¹}ÉÉåMÝÀÉ¡ åIÀÌØíÉ}ÉÉäÉ°ÀÌØíɽÜÄ°ÀÌØíɽÜȤ(%1½°ÀÌØíÍ}ÉÉå1¥¹Ôô}ÉÉäÉQ¼ÅMÑÉ¥¹ ÀÌØíÉ}ÉÉäÉ°ÀÌØíɽÜÈ°ÅÕ½ÐìÅÕ½Ðì°À°Ä¤(%1½°ÀÌØíÍ}ÉÉå1¥¹Ðô}ÉÉäÉQ¼ÅMÑÉ¥¹ ÀÌØíÉ}ÉÉäÉ°ÀÌØíɽÜÄ°ÅÕ½ÐìÅÕ½Ðì°À°Ä¤(%}ÉÉåIÁ±ÉI½ÝMÐ ÀÌØíÉ}ÉÉäÉ°ÀÌØíÍ}ÉÉå1¥¹Ô°ÀÌØíɽÜĤ(%}ÉÉåIÁ±ÉI½ÝMÐ ÀÌØíÉ}ÉÉäÉ°ÀÌØíÍ}ÉÉå1¥¹Ð°ÀÌØíɽÜȤ)¹Õ¹ìôôÐí}ÉÉåMÝÀÉ ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
drlava Posted July 19, 2007 Author Share Posted July 19, 2007 Ok, thanks for the reply, I'll gove it a try. Maybe this feature will eventually be hard-coded. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now