User Tools

Site Tools

한국어

logicpython:cubloc_api:hp

This is an old revision of the document!


HP

Convert an integer to a right-justified uppercase hexadecimal string.

Syntax

from cubloc import HP
 
HP(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 uppercase hexadecimal string padded with spaces or zeros according to zeroPrint.

Exceptions

Example

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