View previous topic :: View next topic
|
Author |
Message |
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
Hi all,
i have following code..
EVALUATE W-NUM
WHEN 1
WHEN 2 PERFORM PARA-1
WHEN 3
WHEN 4 PERFORM PARA-2
WHEN OTHER PERFORM PARA-3
END-EVALUATE
when PARA-1 and PARA-2 will execute?
What will happen if value of W-NUM is 1? |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi,
Quote: |
when PARA-1 and PARA-2 will execute?
|
Para-1 will be executed if value of W-NUM is 1 or 2.
Para-2 will be executed if value of W-NUM is 3 or 4.
Para-3 will be executed for any valid value of W-NUM other than 1,2, 3 or 4.
Quote: |
What will happen if value of W-NUM is 1?
|
Above statement answers this question.
--Parag |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
From the FM:
If a WHEN phrase is selected, execution continues with the first imperative-statement-1 following the selected WHEN phrase. Note that multiple WHEN statements are allowed for a single imperative-statement-1.
Quote: |
when PARA-1 and PARA-2 will execute? |
When 1 or 2 and when 3 or 4 respectivly.
Quote: |
What will happen if value of W-NUM is 1? |
PARA-1 will execute. |
|
Back to top |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
Thanks Parag, thanks William. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
This is so easy to test - why ask first? |
|
Back to top |
|
|
|