View previous topic :: View next topic
|
Author |
Message |
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
What will happen in the following case
MOVE 5 TO PART1
MOVE 6 TO PART2
Which PARA will be performed in the following code,
EVALUATE TRUE
WHEN PART1=5
PERFORM A-PARA
WHEN PART2=6
PERFORM B-PARA
WHEN OTHER
NEXT SENTENCE
END-EVALUATE.
can anyone explain this? |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI,
Quote: |
What will happen in the following case
MOVE 5 TO PART1
MOVE 6 TO PART2
Which PARA will be performed in the following code,
EVALUATE TRUE
WHEN PART1=5
PERFORM A-PARA
WHEN PART2=6
PERFORM B-PARA
WHEN OTHER
NEXT SENTENCE
END-EVALUATE.
can anyone explain this? |
I believe PERFORM A-PARA will perform as it first check the first when statement and evaluate and after that not check the second when and terminate the EVALUATE.
Hope this helps
Regards
Rupesh |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Rupesh is correct.... This code will execute only A-PARA while going thru the EVALUATE statement.
You would like to see here...
Regards,
Priyesh. |
|
Back to top |
|
|
rajesh_1183
Active User
Joined: 24 Nov 2005 Posts: 121 Location: Tadepalligudem
|
|
|
|
Yaa Rupesh is write.In the Evaluate...which ever the first WHEN condition that is true...is executed and exits from the EVALUATE.
Thanks,
Rajesh |
|
Back to top |
|
|
|