WoW:API format: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 12: Line 12:
  > = string.format("%e, %E", math.pi,math.pi)      -- exponent
  > = string.format("%e, %E", math.pi,math.pi)      -- exponent
  3.141593e+000, 3.141593E+000
  3.141593e+000, 3.141593E+000
  > = string.format("%f, %g", math.pi,math.pi)      -- float and compact float
  > = string.format("%f, %g, %.2f", math.pi, math.pi, math.pi)      -- float and compact float
  3.141593, 3.14159
  3.141593, 3.14159, 3.14
  > = string.format("%d, %i, %u", -100,-100,-100)    -- signed, signed, unsigned integer
  > = string.format("%d, %i, %u", -100,-100,-100)    -- signed, signed, unsigned integer
  -100, -100, 4294967196
  -100, -100, 4294967196
Anonymous user