Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Float

From Quake Wiki

Revision as of 19:27, 7 May 2008 by ShoTro (talk | contribs) (New page: === Float type === A floating point value. Floats are also used to store booleans (TRUE, FALSE) or integer values linke counters, or bit flags. Valid syntax: 12, 1.6, 0.5, -100 ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Float type[edit]

A floating point value.

Floats are also used to store booleans (TRUE, FALSE) or integer values linke counters, or bit flags.

   Valid syntax: 12, 1.6, 0.5, -100  
   Invalid syntax: .5

A parsing ambiguity is present with negative constants. "a-5" will be parsed as "a", then "-5", causing an error. Separate the - from the digits with a space "a - 5" to get the proper behavior.