Case statements are enclosed in switching statements. A case statement lists a set of conditions that the server response must satisfy for the case to be activated.
The list of conditions is followed by a colon ':'.
Case statements are processed in the order in which they are listed until the first match is found.
After a match is found for the conditions in a case statement, then the nested statements are executed.
A case condition may be a list of FTP codes and code ranges, a function expression, or one of the special cases, any and timeout.
If a case includes a list of FTP codes/ranges, the list must appear first, followed by any function expressions. The list is comma separated and enclosed in parentheses. Each item in the list must either be a single 3-digit code, or a range specified by two 3-digit codes separated by a double period '..'. The range is inclusive and it is recommended that the lower bound be specified first.
The special cases any and timeout must appear by themselves.
See Also |