Algosim documentation: SetMinLength

SetMinLength

Sets the minimum length formatting setting of an integer.

Syntax

Description

SetMinLength(n, k) returns n with its minimum length formatting setting set to k, so that the result will be formatted with at least k digits, using leading zeros if necessary.

Notes

SetMinLength should not be confused with SetNumDigits, which can be used to specify the number of significant or fractional digits of a real number.

Examples

SetMinLength(SetNumberBase(16#33CCFF, 16), 8)
0033CCFF
SetDigitGrouping(SetMinLength(SetNumberBase(16#33CCFF, 2), 32), 8)
00000000 00110011 11001100 11111111

See also