View previous topic :: View next topic
|
Author |
Message |
lakshmi_p01
New User
Joined: 28 Sep 2005 Posts: 7
|
|
|
|
Is it not possible to declare a numeric variable as S9(13).9(1) in Cobol? I get compilation error if I try this.
Please help me out
Regards,
Lakshmi |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Do yoy mean S9(13)V9(1) or -9(13).9(1)? |
|
Back to top |
|
|
lakshmi_p01
New User
Joined: 28 Sep 2005 Posts: 7
|
|
|
|
I tried declaring it as S9(13).9(1).. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Do you mean S9(13)V9(1) or -9(13).9(1)?
The first is to define an item for computational purposes, a signed 14 digit number with one digit behind the implied decimal point.
The second is to define an item for display purposes, a 14 digit number with the minus sign (if negative) leading and the lowest digit behind a decimal point.
Using the "S" in the same definition with the "." is (apparently) illegal. |
|
Back to top |
|
|
lakshmi_p01
New User
Joined: 28 Sep 2005 Posts: 7
|
|
|
|
I tried with -9(13).9 and it works.. Thanks much William |
|
Back to top |
|
|
|