With IanMs SORT ARRAY command there's no need to use a FOR/NEXT loop to check every element. We only need to check 2 of them (the first against the last).
` Dimensionalize the array
dim Test(99)
` For testing it not being equal
Test(45)=20
` Sort the array (IanMs command)
sort array Test()
` Check if the first element is equal to the last element
if Test(0)=Test(array count(Test()))
print "Equal."
else
print "Not equal."
endif
wait key
If you don't have IanMs Matrix 1 Utilities Plugin already how have you been able to program till now?... with sticks and tape?
Get it here and unleash Darkbasic Pros full potential:
https://forumfiles.thegamecreators.com/download/2192430