if else galore
-
stumbled over this code while maintaining some script for an installer X| : if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; i guess it didn't occur to the fellow who wrote it to use elseif or switch/case :~
-
stumbled over this code while maintaining some script for an installer X| : if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; i guess it didn't occur to the fellow who wrote it to use elseif or switch/case :~
does the script language support switch/case ?
image processing toolkits | batch image processing | blogging
-
does the script language support switch/case ?
image processing toolkits | batch image processing | blogging
yep...in fact I've already replaced it with switch/case:)...
-
does the script language support switch/case ?
image processing toolkits | batch image processing | blogging
-
stumbled over this code while maintaining some script for an installer X| : if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... else if ( SomeCondition ) then ... endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; i guess it didn't occur to the fellow who wrote it to use elseif or switch/case :~
IIRC there was an early version of InstallShield's scripting language which didn't have else if, so you were lumbered with this kind of thing. No switches either. But in your case you say the language does support else if, so no excuse. But could this be an old InstallShield script that hasn't been updated as the language features have moved on?
Kevin
-
IIRC there was an early version of InstallShield's scripting language which didn't have else if, so you were lumbered with this kind of thing. No switches either. But in your case you say the language does support else if, so no excuse. But could this be an old InstallShield script that hasn't been updated as the language features have moved on?
Kevin
well it was written from scratch on a script version that did support elseif/switch-case, but i guess if the guy/gal was used to working on an old version that didn't support it, could be they thought the new one didn't either... prolonged InstallShield usage does also have the capability to pretty much kill the any enthusiasm for development inside you...maybe he/she was just fed up!;P
-
well it was written from scratch on a script version that did support elseif/switch-case, but i guess if the guy/gal was used to working on an old version that didn't support it, could be they thought the new one didn't either... prolonged InstallShield usage does also have the capability to pretty much kill the any enthusiasm for development inside you...maybe he/she was just fed up!;P
I don't know about you but one of the first things I do when a new version of a language comes out is look up what's new. But I suspect many don't bother with that.
Kevin