ARTFiddle
New Fiddle
My Fiddles
Tutorial Fiddles
ART Syntax Help
About
Contact
Register
Log in
file1.art
% Select command in ART is very similar to the concept of switch-case structures in common programming languages % We can define option statements enclosing the code to be executed if option value matches variable value and % We can have otherwise branch which will be executed if none of the optios are met FIRST: #adapt: "file2.art" #set var1 = "A" #endadapt SECOND: #adapt: "file2.art" #set var1 = "C" #endadapt
file2.art
#select var1 #option A -- Var1 is "A" #endoption #option "B" -- Var1 is "B" #endoption #otherwise -- Var1 is not "A" and not "B" #endotherwise #endselect
file3.art
output
FIRST: -- Var1 is "A" SECOND: -- Var1 is not "A" and not "B"