The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_dstruct
Class: TFeatureMatrix
Declaration: [1] function Fill (fix: integer; FeatVal: string): boolean;
[2] function Fill (fix: integer; FeatVal: int64): boolean;
[3] function Fill (fix: integer; FeatVal: double): boolean;
[4] function Fill (fix: integer; FeatVal: TTriState): boolean;

The function Fill fills the values of the feature fix of all objects of the matrix with the value defined by the parameter FeatVal. The parameter fix may assume values between 1 and NFeatures. There are four overloaded versions of the Fill function which have to be used in accordance to the type of the feature. Using the wrong function results in an exception.

For example, trying to fill a feature defined as an integer feature using the overloaded version for a double precision value (version [3]) will result in an exception. The situation is slightly different if your use version [1] passing string values: you can pass numeric values and tri-state values as strings as long as the string in FeatVal complies to the rules of the corresponding feature type. Valid tri-state values are 'true', 'false' and '' (empty string).

Example: Assume that feature 2 has been set to represent an integer value and all values of feature 2 should be set to the value 1036. In this case you can fill feature 2 either by using version [2] or version [1]:
  Fill (2, 1036);      // version [2]
  Fill (2, '1036');    // version [1]
But you cannot use version [1] specifying a floating point string:
  Fill (2, '1036.0');  // version [1] results in an exception

Last Update: 2017-Apr-18