Numeric literals - cobol program, COBOL Programming

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)

 

 

Posted Date: 10/16/2012 3:32:10 AM | Location : United States







Related Discussions:- Numeric literals - cobol program, Assignment Help, Ask Question on Numeric literals - cobol program, Get Answer, Expert's Help, Numeric literals - cobol program Discussions

Write discussion on Numeric literals - cobol program
Your posts are moderated
Related Questions
Name the divisions in a COBOL program are given below DENTIFICATION DIVISION DATA DIVISION ENVIRONMENT DIVISION PROCEDURE DIVISION.

Floating Insertion   The currency symbol ($) can emerge in multiples on the left-hand side of the picture. In this situation the character will be treated in similar way as t

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

THE SIMPLE SORT VERB: The process of sequencing the records in some preferred manner is termed as sorting. The Sorting is done upon some key data item in the record. For illus

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

IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be