User Tools

Site Tools

한국어

logicpython:cubloc_api:hp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

logicpython:cubloc_api:hp [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:hp [2026/04/10 05:40] (current) – removed mfranklin
Line 1: Line 1:
-====== HP ====== 
- 
-Convert an integer to a right-justified uppercase hexadecimal string. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import HP 
- 
-HP(value: int, numberOfDigits: int, zeroPrint: int) 
-</code> 
- 
-===== 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 ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: An argument is not an integer. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''zeroPrint'' is not 0 or 1. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import HP 
- 
-# Example usage 
-result = HP(1, 1, 1) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:decn|DecN]] 
-  * [[logicpython:cubloc_api:dp|DP]] 
-  * [[logicpython:cubloc_api:float|Float]] 
-  * [[logicpython:cubloc_api:fp|FP]] 
-  * [[logicpython:cubloc_api:hexn|HexN]] 
  
logicpython/cubloc_api/hp.1775786798.txt.gz · Last modified: by 127.0.0.1