[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] SUBTRACT and std=mf option Was : About the Overflo
From: |
Alain Lucari |
Subject: |
Re: [open-cobol-list] SUBTRACT and std=mf option Was : About the Overflow |
Date: |
Thu Jun 2 07:25:50 2005 |
Hi Peg,
Le Thu, 02 Jun 2005 20:16:27 +0900
Peg <address@hidden> a écrit:
> Hello Alain Lucari,
> Hello all,
>
> Alain Lucari wrote:
> > I am not able to see that : I use Linux and an old
> > version of Open-Cobol without "flavours".
> > Perhaps you can try some others flavours ?
> Sorry, My English is not fluent.
It seem that mine is not better ;-)
> Is this a meaning "Please test in two or more environments" ?
Ya, You can use std=default (or nothing=no std clause), cobol85,
cobol2002,ibm,mf,v023
It seem that the result was good (with OC-0.31 ?) without an "std"
clause.
It seem also that your test
> VineLinux 3.0 (OpenCOBOL 0.30)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- OK
is so bad than others, NO ?
Why you try with mf ? it's not the better !
v023 was very good ...
Try also what append with "pic S9(2)"
and with an "on size error" clause
like
COMPUTE DATA1 = DATA1 - 1 on size error display "Error " data1.
SUBTRACT 1 FROM DATA2 on size error display "Error " data2.
>
> I moved the following codes by two or more environment and version.
>
> ------------------------------
> IDENTIFICATION DIVISION.
> PROGRAM-ID. TESTSUB.
> DATA DIVISION.
> WORKING-STORAGE SECTION.
> 01 DATA1 PIC 9(2) VALUE 5.
> 01 DATA2 PIC 9(2) VALUE 5.
> PROCEDURE DIVISION.
> COMPUTE DATA1 = DATA1 - 1.
> SUBTRACT 1 FROM DATA2.
> DISPLAY DATA1 " " DATA2.
> ------------------------------
>
> This is a result.
> It seems to obtain a normal result in OpenCOBOL 0.30.
>
> DebianLinux 2.4.24 (OpenCOBOL 0.32)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- NG
>
> VineLinux 3.0 (OpenCOBOL 0.30)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- OK
OK ? seem so bad than others, NO ?
>
> Cygwin 1.5.17 (OpenCOBOL 0.33 CVS 20050601)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- NG
>
> Cygwin 1.5.17 (OpenCOBOL 0.32)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- NG
>
> Cygwin 1.5.17 (OpenCOBOL 0.31)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 96 <- NG
>
> Cygwin 1.5.17 (OpenCOBOL 0.30)
> $ cobc TESTFLOW.COB -free -std=mf
> $ ./TESTFLOW
> 04 04 <- OK
>
> Best regards,
>
Best regards,
--
Alain Lucari (Eurlix)