خانه > cat > number 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar id vi ko ja ru zh zh_TW eo
قبلی  بعدی  ویرایش  تغییر نام  واگرد  Search  سرپرستی  
مستندات  
اخطار! این صفحه ترجمه نشده است.  مشاهده نسخه انگلیسی 
Number
A number consists of an optional sign, one or more digits, an optional decimal point followed optionally by one or more digits, optionally followed by the letter e, optionally followed by a sign, followed by one or more digits.

 [ sign ] digit [ digit [ ... ]] [ . { digit [ digit [ ... ] ] } ] [ { e | E } [ sign ] digit [ digit [ digit [ ... ] ] ]

If a decimal-point is used, at least one digit must precede it. While no digits are required after a decimal point, at least one digit must follow an E or e if it is used.

Specifying an exponent does not necessarily mean the number is a floating-point.

The following are all valid numbers:

0 -0 +0 (all three are the same integer 0)
0.0 0. -0.e0 -0.0 +0.0 (all are the same float 0.0)
1 +1 -1  7. 1.0 -1.0 -10.0e-1 -0.1e+1  3716  -4033  1.5  -12.34  1. 01.0 3.14159267 1E5 1.7E-3

The following are all the same value, and represent an Integer:

1000000 1E+7 10E6 10000000E-1

The following are all the same, and represent a floating-point number:

1000000.0 1.E+7 1.0e7 10.0e6 0.100E8 10000000.0E-1

همچنین مشاهده کنید

Expressions, Floating Point Numbers, Integer