4DQuiz


OT SortArrays View from small screen devices!  

OT SortArrays version 1

OT SortArrays(inObject; inTag1; inDirection1 {; ...inTag7; inDirection7})

Parameter Type Description

inObject Longint A handle to an object

inTag1 String Tag of the array to sort

inDirection1 String Direction of sort

Discussion

OT SortArrays performs a multilevel sort on one or more arrays in inObject. You may sort up to seven arrays at once with this command.

If inObject is not a valid object handle, if no item in the object has the given tag, if the item’s type is not a sortable array type, if all of the arrays do not have the same number of elements, or if a direction is not valid, an error is generated and OK is set to zero.

The direction should be one of three values to indicate how to sort the array:

Value Sort direction

">" Ascending
"<" Descending
"*" Move with previous array

For example, to sort parallel arrays of names and associated ids, you would use something like this:

OT SortArrays($object;"names";">";"ids";"*")

To sort a group of addresses by state and then city within each state, you would use something like this:

OT SortArrays($object;"states";">";"cities";">")



Topics of Interest
OT SizeOfArray
Array Utility Routines
 

Published date: Sun, 16 Jul 2006 22:46:08 GMT   → View XML Version

Edit this page now

© 2005 - 2006 4dquiz.com, All trademarks accepted. All Rights Reserved!
Site Index