[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] What should this produce ?
From: |
Roger While |
Subject: |
[open-cobol-list] What should this produce ? |
Date: |
Mon Apr 3 06:10:03 2006 |
As per title :
IDENTIFICATION DIVISION.
PROGRAM-ID. MYPROG.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 R1 PIC 9(9)V9(9) VALUE 123456.123456.
01 R2 PIC 9(9)V9(9) VALUE 123456.123456.
01 R3 PIC S9(9)V9(9) VALUE 0.
01 R4 PIC 9(9)V9(9) COMP VALUE 123456.123456.
01 R5 PIC 9(9)V9(9) COMP VALUE 123456.123456.
01 R6 PIC S9(9)V9(9) COMP VALUE 0.
01 R7 PIC S9(12)V9(6).
PROCEDURE DIVISION.
A-START.
MULTIPLY R1 BY R2 GIVING R3.
DISPLAY R3.
MULTIPLY R4 BY R5 GIVING R6.
DISPLAY R6.
MOVE R6 TO R7.
DISPLAY R7.
ADD 1 TO R6
DISPLAY R6.
MOVE R6 TO R7.
DISPLAY R7.
STOP RUN.
Note for OC, you will need one of the "-std=" options
mvs, ibm, mf, bs2000.
MF produces a very interesting result (SE 2.2 and 4.0)
(NOTRUNC doesn't affect it and neither does DIALECT=)
Roger
Roger
- [open-cobol-list] What should this produce ?,
Roger While <=