Difference between revisions of "Select Case"
From ArcoWiki
(Created page with "The construct '''SELECT CASE''' is the technique to condition the execution of a program depending the value of a certain variable. <code><span style="color: green; t...") |
|||
Line 1: | Line 1: | ||
− | The construct '''[[ | + | The construct '''[[Select Case]]''' is the technique to condition the execution of a program depending the value of a certain [[variable]]. |
<code><span style="color: green; text-decoration: none;">$$ Example of Select Case</span><br/></code> | <code><span style="color: green; text-decoration: none;">$$ Example of Select Case</span><br/></code> |
Revision as of 12:44, 3 August 2016
The construct Select Case is the technique to condition the execution of a program depending the value of a certain variable.
$$ Example of Select Case
DECL/INTGR,i
DECL/CHAR,50,tx
i=ASSIGN/10
SELECT/i
$$ i is the variable that controls the part program behavior
CASE/10
$$ If the i value is equal to 10
tx=ASSIGN/CONCAT('THE ACTUAL VALUE OF X IS: ',STR(i))
TEXT/OPER,tx
ENDCAS
CASE/20
$$ If the i value is equal to 20
tx=ASSIGN/CONCAT('THE ACTUAL VALUE OF X IS: ',STR(i))
TEXT/OPER,tx
ENDCAS
DFTCAS
TEXT/OPER,'X is not equal to the 2 cases'
ENDCAS
ENDSEL