Init (initialize the StepStringClass object)

Top  Previous  Next

 

Init( controls, mode )

Init

Initializes the StepStringClass object.

controls

An integer constant, variable, EQUATE, or expression that contains several important pieces of information for the StepClass object.

mode

An integer constant, variable, EQUATE, or expression that determines the data distribution points (or steps) the StepStringClass object implements.

The Init method initializes the StepStringClass object.

The controls parameter identifies for the StepClass object:

the characters included in the calculated runtime distribution

whether the key is case sensitive

the direction of the sort (ascending or descending)

A mode parameter value of ScrollBy:Name gives U.S. surname distribution, ScrollBy:Alpha gives English alphabet distribution, and ScrollBy:Runtime gives a smooth data distribution from the poles of the actual data, as calculated by the SetLimit method.

Implementation:

The Init method sets the value of the Controls and LookupMode properties. Set the value of the Controls property by adding together the applicable EQUATEs declared in ABBROWSE.INC as follows:

ITEMIZE,PRE(ScrollSort)

AllowAlpha    EQUATE(1)  !include ABCDEFGHIJKLMNOPQRSTUVWXYZ

AllowAlt      EQUATE(2)  !include `!"£$%%^&*()''-=_+][#;~@:/.,?\|

AllowNumeric  EQUATE(4)  !include 0123456789

CaseSensitive EQUATE(8)  !include abcdefghijklmnopqrstuvwxyz

Descending    EQUATE(16) !the sort is descending

END

EQUATEs for the mode parameter ared declared in ABBROWSE.INC as follows:

   ITEMIZE,PRE(ScrollBy)

Name    EQUATE     !US Surname distribution

Alpha   EQUATE     !English alphabet distribution

Runtime EQUATE     !calculate normal distribution from data poles

   END

Example:

MyStepStringClass.Init(ScrollSort:AllowAlpha+ScrollSort:AllowNumeric)

!program code

MyStepStringClass.Kill

See Also:     StepClass.Controls, LookupMode, SetLimit