Numeric constant: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
The " | The "numeric constant" parameter represents a number consisting mainly of the digits 0-9; other optional elements are a decimal point (.), a minus sign (-) to indicate a negative number, and a plus sign (+) to indicate a positive number (unsigned numbers are assumed to be positive). If a sign is specified, it must precede the digits. Spaces are not allowed in a numeric constant. | ||
Integers, fixed-point numbers and floating point numbers (numbers in exponential notation) are three types of numeric constants. See the following examples: | Integers, fixed-point numbers and floating point numbers (numbers in exponential notation) are three types of numeric constants. See the following examples: | ||
Line 26: | Line 26: | ||
<noinclude> | <noinclude> | ||
[[Category:Definitions]] | [[Category:Definitions]] | ||
[[Category:All Parameters]] | |||
</noinclude> | </noinclude> |
Latest revision as of 20:13, 6 May 2014
The "numeric constant" parameter represents a number consisting mainly of the digits 0-9; other optional elements are a decimal point (.), a minus sign (-) to indicate a negative number, and a plus sign (+) to indicate a positive number (unsigned numbers are assumed to be positive). If a sign is specified, it must precede the digits. Spaces are not allowed in a numeric constant.
Integers, fixed-point numbers and floating point numbers (numbers in exponential notation) are three types of numeric constants. See the following examples:
- Number
- 44
- +15.38
- -86.34
- 10,000
- Integer
- 44
- n/a
- n/a
- 10000
- Fixed Point
- 44
- +15.38
- -86.34
- 10000
- Exponential
- 4.4E+1
- 1.538E+1
- -8.634E+1
- 1E+4