Sunday, December 14, 2008

Rules for constructing Real Constants

Real constants or floating point constants could be written in two forms,
a) Fractional form
b) Exponential form
{also see: Rules for constructing Real Constants in exponential form}
Following rules are to be observed while constructing real constant expression in fractional forms:
1. A real constant must have at least one digit.
2. It must have a decimal point.
3. It could be either +ve or –ve.
4. Default sign is +ve.
5. No commas or blanks are allowed within a real constants.
Ex:
+523.26
458.0
-87.54
-57.5693

No comments:

Post a Comment

Please give your valuable comments or queries if you fell its helpful or if you like the contents of the site. Thanks...