View previous topic :: View next topic
|
Author |
Message |
Sasi Kiran Patha Warnings : 2 New User
Joined: 19 Nov 2006 Posts: 73 Location: Hyederabad
|
|
|
|
Hi,
Would anyone let me know how ON condition works in VSCOBOL.
How do we convert a code using ON condition into a code that uses
IF condition.
Regards,
Sasi Patha. |
|
Back to top |
|
|
Sasi Kiran Patha Warnings : 2 New User
Joined: 19 Nov 2006 Posts: 73 Location: Hyederabad
|
|
|
|
hi,
here is the info i got about about ON condition .
its a part of "Converted COBOL Language Elements"...
The ON statement is not supported by the target languages.
The statement:
ON integer
imperative statement
is converted to:
ADD 1 TO LCP-ONCTR-nn
IF LCP-ONCTR-nn = integer
imperative statement
The statement:
ON integer-1 until integer-2
imperative statement
is converted to:
ADD 1 TO LCP-ONCTR-nn
IF LCP-ONCTR-nn > (integer-1 - 1) & < integer-2
imperative statement
A data item with the dataname LCP-ONCTR-nn (where nn is a sequence number) is added into the WORKING-STORAGE section with an initial value of zero.
More complex ON statements are flagged. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
The most poular use of the ON stmt when it was supported was as a 1st time switch.
Very handy; I miss it. |
|
Back to top |
|
|
|