Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords:
What I want to do is to have multiple values under one case. So if the the result of the case is 1, 2 or 3 I want it to execute the same set of commands, rather than typing those commands out three times under a seperate case each time.
At the moment my code looks like this :-
Switch directory Case 1 directory = "/home/columbus" break Case 5 directory = "/home/columbus" break Case 6 directory = "/home/columbus" break End SwitchThis code works, but there is a lot of repetition. I would like to make it smaller.
At first I tired this :-
Switch directory Case 1, 5, 6 directory = "/home/columbus" break End SwitchThe result was an error code "3074: Expression continues past expected end" on the line "Case 1, 5, 6". Is there anyway to achieve want I want ?
Thanks.
Switch directory Case 1 Case 5 directory = "/home/columbus" breaketc...
Article ID: W14234
Filename: Switch Statement - Multiple Values Under One Case.txt
File Created: 1999:10:26:11:22:40
Last Updated: 1999:10:26:11:22:40