gnucobol-users
[Top][All Lists]
Advanced

[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: Peg
Subject: Re: [open-cobol-list] SUBTRACT and std=mf option Was : About the Overflow
Date: Thu Jun 2 09:18:54 2005
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hello Alain Lucari and all,

Alain Lucari wrote:

>> VineLinux 3.0 (OpenCOBOL 0.30)
>> $ cobc TESTFLOW.COB -free -std=mf
>> $ ./TESTFLOW
>> 04 96                <- OK
>
>
> is so bad than others, NO ?

It is a description mistake.
The following are correct.
VineLinux 3.0 (OpenCOBOL 0.30)
$ cobc TESTFLOW.COB -free -std=mf
$ ./TESTFLOW
04 04                <- OK

> Why you try with mf ? it's not the better !

Reason to want to use mf(or ibm)...
The purpose is to obtain the following results at overflow.
data1 pic 9(02) value 99.
data1 + 2 = 01

The purpose is to transplant the cobol code
made by the compiler to operate like this.

> 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.

OK.
The code in which "on size error" clause
was added was executed.

Cygwin 1.5.17 (OpenCOBOL 0.33 CVS 20050601)
$ ./TESTFLOW2
04 04
Oh, The result of the expectation was obtained.


Question
Why is not a correct value obtained by "TESTSUB"
that added "std=mf" option of OpenCOBOL 0.31(or latest)?
It is Bug?

Best regards,

--
Peg, PegStyle mailto:address@hidden
http://members8.tsukaeru.net/pegstyle/
(OpenCOBOL Cygwin/MinGW Binary Download Site.
 But Japanese Page Only)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]