User Tools

Site Tools

한국어

logicpython:cubloc_api:hexn

Differences

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

Link to this comparison view

logicpython:cubloc_api:hexn [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:hexn [2026/04/10 05:40] (current) – removed mfranklin
Line 1: Line 1:
-====== HexN ====== 
- 
-Hex formatting variants: ''Hex'' and ''Hex1'' through ''Hex8''. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import HexN 
- 
-# Natural width 
-Hex(value: int) 
- 
-# Fixed width 
-Hex1(value: int) ... Hex8(value: int) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **value**: Integer ''value'' to format. 
-  * **digits**: Field width for ''HexN'' variants. Use 0 for natural width (''Hex''). 
- 
-===== Return Value ===== 
- 
-Returns the formatted uppercase hexadecimal string using either natural width (Hex) or fixed-width right-justified text (Hex1 through Hex8). 
- 
-===== Notes ===== 
- 
-  * ''Hex(value)'' returns natural-width uppercase hexadecimal text. 
-  * ''Hex1''..''Hex8'' return right-justified uppercase hexadecimal text in fixed-width fields. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import Hex, Hex2, Hex8 
- 
-# Use Hex for natural width, or HexN variants for fixed width. 
-value = 255 
-print(Hex(value))     # e.g. FF 
-print(Hex2(value))    # e.g. 'FF' 
-print(Hex8(value))    # e.g. '      FF' 
-</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:hp|HP]] 
  
logicpython/cubloc_api/hexn.1775786798.txt.gz · Last modified: by 127.0.0.1