gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] what happens in case of overflow?


From: Jose Vilmar Estacio de Souza
Subject: [open-cobol-list] what happens in case of overflow?
Date: Thu Jan 26 09:00:11 2006

Hi all.
I've the following program:

------
      identification division.
      program-id. t4.
      environment division.
      data division.
      working-storage section.
      77 x pic 9(1) value 9.
      procedure division.
      display "x = " x
      add 1 to x
      display "x after the add = " x
      stop run.
------

Executing the program I receive the following result:
$ ./t4
x = 9
x after the add = 9
$

When executing the same program in my old micro focus cobol environment, I'm receiving the following result:
$ cobrun t4
x = 9
x after the add = 0
$

Thanks.


reply via email to

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