Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. if else galore

if else galore

Scheduled Pinned Locked Moved The Weird and The Wonderful
7 Posts 4 Posters 18 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Haroon Sarwar
    wrote on last edited by
    #1

    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 :~

    C K 2 Replies Last reply
    0
    • H Haroon Sarwar

      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 :~

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      does the script language support switch/case ?

      image processing toolkits | batch image processing | blogging

      H M 2 Replies Last reply
      0
      • C Chris Losinger

        does the script language support switch/case ?

        image processing toolkits | batch image processing | blogging

        H Offline
        H Offline
        Haroon Sarwar
        wrote on last edited by
        #3

        yep...in fact I've already replaced it with switch/case:)...

        1 Reply Last reply
        0
        • C Chris Losinger

          does the script language support switch/case ?

          image processing toolkits | batch image processing | blogging

          M Offline
          M Offline
          Muammar
          wrote on last edited by
          #4

          Chris Losinger wrote:

          does the script language support switch/case ?

          :laugh::laugh: Good one!!


          Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

          1 Reply Last reply
          0
          • H Haroon Sarwar

            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 :~

            K Offline
            K Offline
            Kevin McFarlane
            wrote on last edited by
            #5

            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

            H 1 Reply Last reply
            0
            • K Kevin McFarlane

              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

              H Offline
              H Offline
              Haroon Sarwar
              wrote on last edited by
              #6

              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

              K 1 Reply Last reply
              0
              • H Haroon Sarwar

                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

                K Offline
                K Offline
                Kevin McFarlane
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups