Common Verbs

In cobol a verb is a keyword that does something (docs). We will cover the compute, divide, multiply, subtract, add, move, and initialize verbs. These are verbs you will use often in cobol programming to calculate, say the result of a business transaction.

compute — can be used to do arithmetic and store the result in a variable

divide — can be used to divide two numbers

multiply — can be used to you guessed it, multiply

add — adds two variables/numbers

move — moves a value or reference from a variable into another variable.

initialize — this is used above to reset a variable after its been set


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *