整數 (int
)
所有整數數字。請參閱 數字 以獲取更多資訊。
由以下項目回傳
整數物件由下列函式和方法回傳
get_option()
bool.to_int()
cfg_data.get()
cfg_data.get_unquoted()
compiler.alignment() (編譯器對齊)
compiler.compute_int() (編譯器計算整數)
compiler.sizeof() (編譯器大小)
list.length() (列表長度)
runresult.returncode() (執行結果回傳碼)
str.to_int()
整數方法
int.is_even()
如果數字是偶數則回傳 true。
簽名
bool is_even()
int.is_odd()
如果數字是奇數則回傳 true
簽名
bool is_odd()
int.to_string()
將數字的值回傳為字串。
簽名
# Returns the value of the number as a string
str to_string(
int [fill], # Left fill the string with zeros until it reaches the length
)
引數
方法 int.to_string()
接受下列位置引數
名稱 | 類型 | 描述 | 標籤 |
---|---|---|---|
fill (填充) |
int (整數) |
使用零向左填充字串,直到達到此引數指定的長度。前導負號計入長度,並通過在 |
[選用] |
搜尋結果為