Discussion:
書式記述子のflagsについて
(too old to reply)
リリー
2005-09-14 21:22:27 UTC
Permalink
$B$O$8$a$^$7$F!"(B
$B#J#a#v#a$N3X=,$r$7$F$$$k%j%j!<$H$b$&$7$^$9!#(B

$B#***@8l$N$h$&$K!"(B
$B0J2<$K<($9$h$&$J$3$H$r$7$?$$$N$G$9$,!"(B
$B#J#a#v#a$G$O$&$^$/$$$-$^$;$s!#!J5c(B

printf( "%04H\n", 31 );

$B#J#a#v#a$G!"0J2<$N%3!<%I$r<B9T$9$k$HNc30$,H/@8$7$F$7$^$$$^$9!#(B
$B!J(BFormatFlagsConversionMismatchException$B!K(B

System.out.printf( "%04H%n", 31 );

$B>e5-$r<B8=$5$;$k$?$a$K!"(B
$B0J2<$N$h$&$J%3!<%I$r=q$$$F$$$k$N$G$9$,!"(B
$B$3$s$J$3$H$7$J$$$H%@%a$J$N$G$7$g$&$+!)(B

finel int ACCURACY = 4;

int i = ACCURACY - Integer.toHexString( a ).length();
while( i-- > 0 ) System.out.print( "0" );

System.out.printf( "%H%n", a );

$B%9%^!<%H$JJ}K!$,$"$j$^$7$?$i$*$7$($F$/$@$5$$!#(B
$B$*$M$,$$$7$^$9!#(B
--
$B%j%j!<(B
k***@gssm.otsuka.tsukuba.ac.jp
2005-09-14 23:38:28 UTC
Permalink
$B5WLn$G$9!#(B
Post by リリー
System.out.printf( "%04H%n", 31 );
16$B?J?t=PNO$N5-=R;R$O!V(BH$B!W$8$c$J$/!V(BX$B!W$G$9$h!#$"$H!V(B%n$B!W$H$$$&(B
$B$N$O2?$,$d$j$?$$$s$G$9$+!#BP1~$9$k%G!<%?$,$J$$$7!#9T$+$($@$C$?$i(B
$B!V(B\n$B!W$G$7$g!#(B

$B%^%K%e%"%kD4$Y$:$K%d%^%+%s$G$H$$$&$N$OL5M}$9$.!#(B $B5WLn(B
リリー
2005-09-15 22:12:10 UTC
Permalink
$B$42sEz$"$j$,$H$&$4$6$$$^$9!#(B
Post by k***@gssm.otsuka.tsukuba.ac.jp
Post by リリー
System.out.printf( "%04H%n", 31 );
16$B?J?t=PNO$N5-=R;R$O!V(BH$B!W$8$c$J$/!V(BX$B!W$G$9$h!#$"$H!V(B%n$B!W$H$$$&(B
$B$=$NDL$j$G$7$?!#(B ($B4@(B
$B!V(BX$B!W$rF,$N$J$+$G!V(BH$B!W$K>!<j$KCV$-49$($F$$$?$h$&$G$9!#(B
Post by k***@gssm.otsuka.tsukuba.ac.jp
$B!V(B\n$B!W$G$7$g!#(B
$BBP1~%G!<%?$,I,MW$J$s$G$9$+!)(B

$B!V(B%n$B!W$O!"(B
$B9T$***@Z$jJ8;z(B(line.seprator)$B$rI=$9=q<05-=R;R$@$HH=CG$7$F$$$^$7$?!#(B
$B!V(B%n$B!W$O;H$o$J$$$[$&$,NI$$$s$G$9$M!#(B
Post by k***@gssm.otsuka.tsukuba.ac.jp
$B%^%K%e%"%kD4$Y$:$K%d%^%+%s$G$H$$$&$N$OL5M}$9$.!#(B $B5WLn(B
$B5WLnMM$H$O0c$C$F!"F,$N$G$-$,NI$/$J$$$N$G!"(B
$B0lEYFI$s$@$@$1$G$O!"(B
$BM}2r$G$-$J$$$H$-$bB?!9$"$k$h$&$G$9$,!"$,$s$P$j$^$9!*(B


--
$B%j%j!<(B
k***@gssm.otsuka.tsukuba.ac.jp
2005-09-15 23:20:29 UTC
Permalink
$B5WLn$G$9!#$9$$$^$;$s!"8eH>$O;d$,Bg%\%1$G$7$?!#(B
Post by k***@gssm.otsuka.tsukuba.ac.jp
$B!V(B\n$B!W$G$7$g!#(B
$BCG$7$F$$$^$7$?!#!V(B%n$B!W$O;H$o$J$$$[$&$,NI$$$s$G$9$M!#(B
$BBgJ8;z$H8+4V0c$$$^$7$F(B ^_^;;; $B!V(B%N$B!W$,%J%N%;%+%s%IJQ495-=R;R$G(B
Post by k***@gssm.otsuka.tsukuba.ac.jp
$B%^%K%e%"%kD4$Y$:$K%d%^%+%s$G$H$$$&$N$OL5M}$9$.!#(B $B5WLn(B
$B$H$$$&***@MU$,<+J,$K5"$C$F$-$^$7$?!D(B $B5WLn(B

Loading...