Tips

Is the Element Zero Sorted in Arrays?

日付2001/04/06
ID01-559
バージョン6.5.x and 6.7.x
プラットフォームWindows and Mac

The element zero in an array is not sorted when you use the command SORT ARRAY. Here is an example to illustrate that:

After you execute SORT ARRAY(aLetter;>), the array contents become:
aLetter{0}="Z"
aLetter{1}="A"
aLetter{2}="B"
aLetter{3}="C"
aLetter{4}="D"
aLetter{5}="E"

After you execute SORT ARRAY(aLetter;<), the array contents become:
aLetter{0}="Z"
aLetter{1}="E"
aLetter{2}="D"
aLetter{3}="C"
aLetter{4}="B"
aLetter{5}="A"

To copy the code described above, select the text below:

Case of
: (Form event=On Load )
ARRAY STRING(10;aLetter;5)
aLetter{0}="Z"
aLetter{1}="A"
aLetter{2}="B"
aLetter{3}="C"
aLetter{4}="D"
aLetter{5}="E"
End case