Numeric constant: Difference between revisions
Jump to navigation
Jump to search
(Created page with "The "num-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 ...") |
No edit summary |
||
(2 intermediate revisions 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 23: | Line 23: | ||
:-8.634E+1<br> | :-8.634E+1<br> | ||
:1E+4 | :1E+4 | ||
<noinclude> | |||
[[Category:Definitions]] | |||
[[Category:All Parameters]] | |||
</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