Rules for constructing an arithmetic expression, COBOL Programming

Assignment Help:

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. 


Related Discussions:- Rules for constructing an arithmetic expression

If- else statement - cobol programming, IF ... ELSE STATEMENT: We are ...

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

Difference between index and subscript, What is the difference b/w index an...

What is the difference b/w index and subscript? Subscript indicates to the array occurrence whereas index is the displacement (in no of bytes) from the beginning of the array.

Divide verb, DIVIDE VERB: The aim of the DIVIDE verb is to divide one ...

DIVIDE VERB: The aim of the DIVIDE verb is to divide one number by the other and to store the result.  There are few forms of this verb. One of its forms is as shown below:

Illustration of divide verb, Illustration of Divide verb: (a) DIVIDE 5...

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

Second form of divide verb, Second form of Divide verb: The second for...

Second form of Divide verb: The second form of this verb is as shown below: In this situation the identifier-1 or numeric- literal-1 will be divided by identifier-2 or

Transaction file - file updation, Transaction file : A transaction file...

Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

Move corresponding - cobol verb, MOVE CORRESPONDING: It is frequently ...

MOVE CORRESPONDING: It is frequently required to move some of the data items of one group to some other data items in the other group. If the names of the equivalent data item

Value clause - cobol programming, VALUE CLAUSE: The value clause defin...

VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di

Program for perform - varying, PROGRAM FOR PERFORM - VARYING: We have ...

PROGRAM FOR PERFORM - VARYING: We have to write a program to elaborate PERFORM ...VARYING Identification division. Program- id. PerfVary. Environment division. Dat

Label records or disk directory - file characteristics, Label Records / Dis...

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe

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