I'm trying to become familiar with arrays.
One thing I need to do is display the contents of the array. When I use "combine" it appears to change the array into a string. So, for example if I write: put 12 into elemArray[C], and then write: combine elemArray using CR and comma, I my elemArray is not an array any longer.
I would like to display my array without changing it into a different form. Can I do this? Is there a copy command that duplicates my array variable into another variable?
Thanks,
--Doug
array manipulations
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: array manipulations
Hi Doug,
maybe
...
put my_array1 into copy_of_my_array1
...
will work for you?
maybe
...
put my_array1 into copy_of_my_array1
...
will work for you?
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: array manipulations
Klaus is correct. But what he may not have said strongly enough is that when you combine an array, you change the array to an ordinary variable. The array is toast. So he suggests that you work with a copy, that you an do with as you like, and still keep the original.
You can always "split" the data you have "combined", though, if you think that is better. This will give you back your array.
Craig Newman
You can always "split" the data you have "combined", though, if you think that is better. This will give you back your array.
Craig Newman