home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 January / PCWELT_1_2006.ISO / pcwsoft / autoit-v3-setup.exe / Examples / StringFormat.au3 < prev    next >
Encoding:
Text File  |  2004-09-22  |  291 b   |  9 lines

  1. $string = "string"
  2. $float = 12.3
  3. $int = 345
  4. $s =StringFormat ( "var1=%s var2=%.2f, var3=%d" ,$string, $float, $int )
  5. $msgbox(0, "Result", $s)
  6. ; will output         "var1=string var2=12.30 var3=345"
  7. ; notice the 12.30  done with the %.2f which force 2 digits after the decimal point
  8.  
  9.