March 2018
Beginner to intermediate
514 pages
13h 11m
English
This control statement executes the Case that matches the expression. Switch is generally used when we want to avoid the use of nested IF statements.
The syntax is as follows:
Switch expression {case valuelist [ statements ]} [default statements] end switch
The following example checks the environment in which the application is hosted by including a file which contains the variable with the environment. After this, we load a file from a folder connection created in the server. The load will point to the file in the current environment:
/*The following code includes a file containing a variable definition with string Live, UAT or Development.Folder connections with name ConnectionLive, ConnectionUAT ...
Read now
Unlock full access