I have an array:
1 2
2 2
3 1
4 1
6 1
8 1
11 1
but when combined I get
2,1,2,1,1,1,1.
What's up Doc?
Array's awry
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Array's awry
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
Programming powered by coffee.
Re: Array's awry
Hi.
Not sure what exactly what you did, but step through this and write back.
Note that unless you sort in the clear, an array has no obligation to maintain any order at all, regardless of how you assemble that array.
Craig Newman
Not sure what exactly what you did, but step through this and write back.
Code: Select all
on mouseUp
put "2" into myArray[1]
put "2" into myArray[2]
put "1" into myArray[3]
put "1" into myArray[6]
put "1" into myArray[8]
put "1" into myArray[11]
combine myArray with return and comma
sort myArray numeric by item 1 of each
end mouseUp
Craig Newman
Re: Array's awry
Craig
A bit befuddled this morning I forgot what I
knew about this subject but as the mist lifted
I realized that I had to do a bit of coding to
get the result I wanted.
So much to learn, so little time.
Thanks for taking the time.
A bit befuddled this morning I forgot what I
knew about this subject but as the mist lifted
I realized that I had to do a bit of coding to
get the result I wanted.
So much to learn, so little time.
Thanks for taking the time.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
Programming powered by coffee.
Re: Array's awry
-Jeremy Hillary Boob"Ad hoc, ad loc and quid pro quo.
So little time — so much to know!"
Yellow Submarine
https://en.wikipedia.org/wiki/Jeremy_Hillary_Boob
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev