Re: Misnomers in the COBOL standard



(Jumping in from my usual lurking...)

I always liked it that COBOL nearly always worked left to right: MOVE VAR1
TO VAR2, ADD 1 to VAR3, etc.
I wish there were a COMPUTE syntax which worked the same way: COMPUTE VAR1 +
VAR2 GIVING VAR3 ???
(The last time I suggested it, everyone thought I was nuts!)

"Richard" <riplin@xxxxxxxxxxxx> wrote in message
news:1152829155.058170.233420@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Robert Jones wrote:

My other bugbear is MULTIPLY a BY b, when in english, I would expect
the result in a rather than b.

The oginal staements in the language always had the last operand as the
result:

MOVE A TO B
ADD A TO B
SUBTRACT A FROM B
DIVIDE A INTO B
MULTIPLY A BY B

When GIVING was added that too put the result in the last operand,
ehich was now after the word GIVING.

DIVIDE A BY B would have broken this which is why it requires GIVING.



.



Relevant Pages