Bruce.Å·B
PerlâPythonÉä×ÄLѪC}C`ÈÌÅÍêØàRÌöí¢B
printf "%d/%d/%d", sub { $_[5]+1900, $_[4]+1, $_[3]}->(localtime);
Æ¢¤eNjbNðQ¿áñÅ©©¯½ÌűêðRubyÅ¢½ç
ǤÈé¾ë¤Æl¦½BàÁÆàAlocaltimeªÈ¢ÌÅ Üè
Ó¡ÍȢ̾ª(Î)
irb(main):045:0> printf '%d/%d/%d', (lambda{|*x| return
x[0],x[1],x[2]}.call(Time.new.year, Time.new.month, Time.new.day))
TypeError: cannot convert Values into Integer
from (irb):45:in `printf'
from (irb):45
from :0
±±ÅÂÜÃB
AprintfªzñðøÉÆÁÄêê΢¢ÌÉÆ «çß©¯½
ƱëÅÓÆv¢o·B
irb(main):002:0> printf '%d%d%d' % [2+1, 3+1, 4+1]
345=> nil
irb(main):003:0>
ÓÞB
Python౤¢¤«ûµÄ½æ¤ÈB