Numeric literals - cobol program, COBOL Programming

Assignment Help:

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)

 

 


Related Discussions:- Numeric literals - cobol program

Sequential files, SEQUENTIAL FILES:   The purpose of the proposed sec...

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

On size error option, ON SIZE ERROR OPTION:   If after an arithmetic ...

ON SIZE ERROR OPTION:   If after an arithmetic expression, the result exceeds the highest value which can be accommodated in the result; this error is termed as size error. T

Program to find interest on bank deposits, PROGRAM TO FIND INTEREST ON BANK...

PROGRAM TO FIND INTEREST ON BANK DEPOSITS: We have to write a program to find interest on deposits. The criteria is given below : identification division. program-

Group item as operand in the relational condition, Group Item as Operand in...

Group Item as Operand in the Relational Condition: Whenever an operand of a relational condition is the group item, the item is then considered to be an alphanumeric field. Th

Evaluate statemant, single program how may when statement has used

single program how may when statement has used

Rules for constructing an arithmetic expression, Rules for constructing an ...

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

Close statement, CLOSE STATEMENT: When the processing of a file is com...

CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is

Concept of a two-dimensional table, Concept of a two-dimensional table: ...

Concept of a two-dimensional table: Concept of a two-dimensional table can be easily extended to tables having three or more dimensions. The Handling of tables up to three dim

Label record and value of clause, LABEL RECORD CLAUSE: This clause spe...

LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL

Case study, cobol program for generate a eb bill

cobol program for generate a eb bill

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd