Numbers in Nasal

From FlightGear wiki
Revision as of 21:37, 4 December 2016 by Red Leader (talk | contribs) (Start article on numbers in Nasal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.


As one would expect, there are numbers in Nasal.

Representation types

Decimal

The most basic number system is the decimal system, based on the number 10. Decimal numbers can be written as integers, floating point numbers, or in exponential form.

Integer

Integers can be written as below:

var number = 1234; # 1,234

Floating point

Floating point numbers can be written as below:

var number = 1.234;

Exponential

Number written in exponential form take the form of number[E/e]power

var number = 12e6; # 12,000,000
number = 4E-2; # 0.04

Hexadecimal

Octal

Operators

1rightarrow.png See Nasal Operators for the main article about this subject.