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
OCCURS CLAUSE - PROGRAM: We have to write a program to elaborate occurs clause. Get names and marks of the students and show them on the screen.   identification division.

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us

FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

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

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

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

INDEXED SEQUENTIAL FILES: In the indexed sequential files which are also known as indexed files, the records are stored in the sequence order generally in ascending order. In

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

PROCEDURE DIVISION statements for the relative files: The statements OPEN, CLOSE, READ, WRITE and REWRITE that are available for sequential files are also available for the re