Rules for constructing an arithmetic expression, COBOL Programming

Rules for constructing an Arithmetic Expression:

The rules for constructing an arithmetic expression are as shown below:

(i) When an arithmetic expression specifies a calculation, it may consist of two or more numeric literals and/or data names joined by the arithmetic operators. The following table lists some of the operations and their meaning.

294_Rules for constructing an Arithmetic Expression.png

There should be at least one space preceding and the operator in an arithmetic expression is as shown below. No two arithmetic operators can appear altogether in an expression. In this respect the ** is considered as a single operator.

(i) Parentheses may be used to indicate the order of the operations in an arithmetic expression. Where the parentheses are absent, then the order is taken to be left to right as shown:

1010_Rules for constructing an Arithmetic Expression1.png

Whenever the parentheses are used, the part of the expression enclosed within the parentheses is computed first. 

Posted Date: 10/16/2012 5:30:39 AM | Location : United States







Related Discussions:- Rules for constructing an arithmetic expression, Assignment Help, Ask Question on Rules for constructing an arithmetic expression, Get Answer, Expert's Help, Rules for constructing an arithmetic expression Discussions

Write discussion on Rules for constructing an arithmetic expression
Your posts are moderated
Related Questions
Example of Level numbers - cobol programming: To explain the hierarchical structure introduced above, the concept of the level number is employed in COBOL. The most broad

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

RULES FOR INDEXED TABLES: The rules of indexing a table with an INDEXED phrase are as shown below: (1) If indexing is completed for any one level of a table, then indexing

BLOCK CONTAINS CLAUSE: Integer -1 of the BLOCK CONTAINS clause indicates the block size either in terms of records or in terms of characters. For illustration, BLOCK CONTAINS

Illustration of Divide verb: (a) DIVIDE 5 INTO A. If the value of A is 20, then after execution of this statement the value of A will be 4. The older value of A will be los

Plus Sign - edit characters for numeric data: + (Plus Sign) : A plus sign is alike to minus sign except that when the item is positive, +sign will be inserted rather th

Example of condition names: The illustration below is of the use of the condition names  77  MARITAL-STATUS     PIC    9   88  SINGLE    VALUE    IS     ZERO   88  MA

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

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

GIVING    file-name-5. The input files to be merged through the MERGE statements which are specified in the USING phrase. These files should be sequential files and should be