User Tools

Site Tools

한국어

logicpython:cubloc_api:dp

This is an old revision of the document!


DP

Convert an integer to a right-justified decimal string.

Syntax

from cubloc import DP
 
DP(value: int, numberOfDigits: int, zeroPrint: int)

Parameters

  • value: Integer to format.
  • numberOfDigits: Total column width. The result is right-justified and padded on the left with spaces (zeroPrint=0) or zeros (zeroPrint=1).
  • zeroPrint: 0 to pad with spaces, 1 to pad with zeros.

Return Value

Returns a right-justified decimal string padded with spaces or zeros according to zeroPrint.

Exceptions

Example

from cubloc import DP
 
# Example usage
result = DP(1, 1, 1)
print(result)
logicpython/cubloc_api/dp.1775786798.txt.gz · Last modified: by 127.0.0.1