Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Lexical analysis > Literals > Floating point literals

Floating point literals

A floating point literal represents a double-precision (64-bit) floating point number. It has three parts: an integer, a fraction, and an exponent.

  float :=  [0-9]* "." [0-9]+ ( [eE] [+-]? [0-9]+ )?

Examples:
  x = 1.0;
  x = 3.14;
  x = .123;
  x = 3.14;
  x = 2.89e11;
  x = .34e-21;
See also  | Literals  | Constants  | Grammar
Contributes notes:
Add a note
What's new | Anvil