●●●●TCL/TKなら俺に聞け 2●●●●
■ このスレッドは過去ログ倉庫に格納されています
0634デフォルトの名無しさん
2010/08/12(木) 19:23:06set shift 1
for { set i 0 } { $i < 64 } { incr i } {
puts [format %016lX $shift]
set shift [expr $shift << 1]
}
The fifth part of a conversion specifier is a size modifier, which must be ll, h, or l.
If it is ll it specifies that an integer value is taken without truncation for conversion
to a formatted substring. If it is h it specifies that an integer value is truncated to
a 16-bit range before converting. This option is rarely useful. If it is l it specifies
that the integer value is truncated to the same range as that produced by the wide()
function of the expr command (at least a 64-bit range). If neither h nor l are present,
the integer value is truncated to the same range as that produced by the int() function
of the expr command (at least a 32-bit range, but determined by the value of
tcl_platform(wordSize)).
http://www.tcl.tk/man/tcl8.5/TclCmd/format.htm#M15
マニュアル嫁。
■ このスレッドは過去ログ倉庫に格納されています