DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


MakeValidLayerRange

Declaration: TMat4D.MakeValidLayerRange (var LowLayer, HighLayer: integer): integer;
The method MakeValidLayerRange ensures that the matrix layer indexes LowLayer and HighLayer are within the valid index range of the matrix (i.e. they are greater or equal to 1 and less than or equal to NrOfLayers). If any of the two variable parameters falls outside the valid range, it is adjusted to the nearest limit. Passing a zero value to both parameters returns the minimum and maximum range values (i.e. 1 and NrOfLayers).

The function returns the following codes:

 0 ... both LowLayer and HighLayer are within the valid range, no adjustments made
-1 ... LowLayer and/or HighLayer have been adjusted because they were outside the valid range