CARD - Get cardinality of an integer

Language reference ›› Built-in functions ›› Miscellaneous ››
Parent Previous Next


Returns the cardinality of an integer expression; that is, the number of set bits in the number, which may be up to 32-bit.

The result is of type BYTE.

This built-in function is available with Extended Pascal option ON.

In extended Pascal this function is designed to give the number of elements in a SET. As PMP does not implement sets, but manages any integer as a set, this function is applicable to any integer expression.