View previous topic :: View next topic
|
Author |
Message |
ganga79
New User
Joined: 16 Nov 2005 Posts: 23
|
|
|
|
Hi Guys,
Please let me know the answer for the below question
DCL A CHAR(4) INIT('10.5')
DCL B DEC FIXED(7,1) INIT(10.5)
B=A +B
OPTIONS:
A. conversion is raised
b. erorr is raised
c. no condition is raised and the value of B is 21
d.No condition is raised and the value of B is 20.5
e.No condition is raised and the value of B is 20
Regards,
Ganga |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What happens when you try this on your system?
Put that bit of code in any small program and try it. If you do not understand what happens, post your source via copy/paste, what the result is also via copy/paste and your question about what happened.
Someone here will be able to clarify. |
|
Back to top |
|
|
senthilnathanj
New User
Joined: 31 Jul 2007 Posts: 47 Location: chennai
|
|
|
|
Hi ganga,
Code: |
DCL A CHAR(4) INIT('10.5')
DCL B DEC FIXED(7,1) INIT(10.5)
B=A +B
|
d.No condition is raised and the value of B is 20.5 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why is this? |
|
Back to top |
|
|
|