Printf "%#.0o", 0

e$B0J2<$N$h$&$K!"e(Bprintf e$B$Ge(B %#.0o e$B$Ke(B 0
e$B$rM?$($k$H6u$K$J$j$^$9!#e(B

% ./ruby -e ‘printf “[%#.0o]\n”, 0’
[]

e$B$7$+$7e(B C e$B$G$O!"$J$s$H$$$&$+Nc30$NNc30$H$$$&46$8$G$9$,!"e(B0
e$B$Ke(B
e$B$J$j$^$9!#e(B

% cat t.c
#include <stdio.h>

int main(int argc, char **argv)
{
printf("[%#.0o]\n", 0);
return 0;
}
% gcc -Wall t.c
% ./a.out
[0]

e$B$3$l$Oe(B [ruby-dev:33411]
e$B$K=q$$$?$h$&$K!"e(B8e$B?J$K$*$1$kBeBX7A<0e(B
e$B$,!"e(Bprecision e$B$rA}$d$98z2L$r;}[email protected]$H;W$$$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs