numeric - literalsthe numeric literal can


Numeric -  Literals:

The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specified the literal then it will be taken as positive. The Negative literals are represented by - sign at the left most ends. If no decimal point is used then the literal is clearly an Integer. If a decimal point is used, it should come in between the digits. The maximum number of digits permitted in a numeric literal is compiler dependent.

Examples:

Valid Numeric Literal                       Invalid Numeric Literals

 

.123                                                  ''123'' (valid as nonnumeric literal but

                                                           invalid as numeric literal)

12.5                                                  - 23 (there is a blank space between the

                                                           sign and the first digit 2)

 

 

Request for Solution File

Ask an Expert for Answer!!
COBOL Programming: numeric - literalsthe numeric literal can
Reference No:- TGS0174216

Expected delivery within 24 Hours