~~~ ;===============整数========================= s1:=Format("{1:+05d} {2:+05d}",-6,7) ;-0006 +0007 s2:=Format("{1:+05d} {2:05d}",-6,7) ;-0006 00007 s4:=Format("{:05}", 0) ;00000 ;====================字符串前导空格==================== s3:= Format("{:3}", "") ;3个空格 s31:=StrReplace(s3," ","s") ;sss s13:= Format("{:3}", "a") ; a s131:=StrReplace(s13," ","s") ;ssa ;================参数用变量和字符串组合而成============ s5:="03d" s6:=Format("{:" s5 "}", 35) ;=============首字母大写====== s7:=Format("{:T}","hello world") ;Hello World ;=============格式化为大写====== s8:=Format("{:U}","hello world") ;HELLO WORLD ;=============格式化为小写====== s9:=Format("{:L}","HELLO WORLD") ;hello world ;==================十六进制输出数字============= s10:=Format("0x{:x}",98) ;0x62 s11:=Format("0x{:05x}",98) ;0x00062 ;=============浮点数======================== s12 := Format("{1:0.3f} {1:.10f}", ATan(1)) Pause ~~~