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: TBitFld
Declaration: [1] procedure RandomFill (Percent: double);
[2] procedure RandomFill (NBits: integer);

The method RandomFill sets either a percentage of randomly selected bits of the bit field (version [1]), or a specified number of bits to TRUE (version [2]). All other bits are set to FALSE.

The percentage is defined by the parameter Percent and may take values between 0.0 and 100.0, the number of bits in version [2] is specified by the parameter NBits and may take values between 0 and Size.

Last Update: 2013-Oct-10