Switch in function - return? -- SOLVED --
Posted: Sat Nov 08, 2008 11:09 pm
I have the following switch:
-- tempext is a 3 char extension
switch (tempext)
case exe
launch templaunch
break
case txt
launch document templaunch
break
case doc
launch document templaunch
break
case com
launch url templaunch
break
case uk
launch url templaunch
break
case net
launch url templaunch
break
case tml
launch url templaunch
break
case php
launch url templaunch
break
end switch
I have 10 buttons I need to apply this to.
How do I put the switch into a function and get the return to perform the relevant launch action?
I know I could get rid of the switch and use if statements and this would be easy to include in a statement but I'm interested if a switch in a function can return?
-- tempext is a 3 char extension
switch (tempext)
case exe
launch templaunch
break
case txt
launch document templaunch
break
case doc
launch document templaunch
break
case com
launch url templaunch
break
case uk
launch url templaunch
break
case net
launch url templaunch
break
case tml
launch url templaunch
break
case php
launch url templaunch
break
end switch
I have 10 buttons I need to apply this to.
How do I put the switch into a function and get the return to perform the relevant launch action?
I know I could get rid of the switch and use if statements and this would be easy to include in a statement but I'm interested if a switch in a function can return?