Description This function specifies a new ordering of the slices within a multi-slice ARN.
Syntax ARNReorderSlices( arn, order() )
Parameters arn As Long Node number of the multi-slice ARN whose slices are being re-ordered.
order() As Long Array specifying the re-ordering of the slices in the ARN. Consider the example below in which the order() array has a length of 3, with array index positions 0, 1 and 2. The array index positions correspond to the final slice index positions in the ARN. The array values indicate the current ARN slice indices. So, the example below specifies the slice reordering textually as, "Current slice at index 2 moves to slice index 0, current slice at index 0 moves to slice index 1, current slice at index 1 moves to slice index 2".
The values in the array are required to be unique or the subroutine will halt with an error.
Example The example below reverses the ordering of the slices within a multi-slice ARN.
Sub Main
Dim msarn As Long, scount As Long msarn = ARNFindName( "Multi-slice ARN 2" ) scount = ARNGetSliceCount( msarn )
'Reverse the order of the slices Dim sorder() As Long, curidx As Long ReDim sorder(scount-1) For curidx = 0 To scount-1 sorder(curidx) = scount-curidx-1 Next ARNReorderSlices( msarn, sorder() )
End Sub
See Also
|