The result of the move from a pic -99.99 is "correct" under MF - at least with 12 zeroes precision - but not with Gnucobol. Is there a reason or is it a bug ?
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As follow-up, the solution is ti use the numval function : move numval(wss-test) to mydouble
But the difference of behaviour of the two compilers is still astonishing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are absolutely right.
No warning issued.
I was just confused because we are porting (or trying to!) an app from MF to Gnucobol and it works without any problem under MF.
Now, we know!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
here is a small program :
Here is the result using Gnucobol:
and using MF:
The result of the move from a pic -99.99 is "correct" under MF - at least with 12 zeroes precision - but not with Gnucobol. Is there a reason or is it a bug ?
Regards.
As follow-up, the solution is ti use the numval function :
move numval(wss-test) to mydouble
But the difference of behaviour of the two compilers is still astonishing.
I believe this to be the proper assignment.
1 wss-test pic S99V99.
move wss-test to mydouble
1 wss-test pic -99.99.
Defined as above is a numeric edited field.
As such the intent of usage is a receiving field only .
Behavior in using a numeric edited field in the manner of your example would produce unpredictable results regardless the compiler vendor.
I would suspect that a warning diagnostic was produced ?
Last edit: Ralph Linkletter 2024-08-01
You are absolutely right.
No warning issued.
I was just confused because we are porting (or trying to!) an app from MF to Gnucobol and it works without any problem under MF.
Now, we know!