random
Type: Boolean
The random property of the SortActor class specifies whether the records or fields in a file are to be sorted in a random order.
Use this property, for example, to randomly sort a file for testing purposes.
The default values for the random property are listed in the following table.
Variable Records, Variable Fields |
Variable Records, Fixed Fields |
Fixed Records, Variable Fields |
Fixed Records, Fixed Fields |
---|---|---|---|
false | false | false | false |
The code fragment in the following example shows the use of the random property to set the SortActor instance to sort the file randomly.
sort1.fieldNo := 1; sort1.startPosition := 1; sort1.length := 4; sort1.random := true;