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. Professional conditions with IF

Professional conditions with IF

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharphelpquestion
26 Posts 13 Posters 0 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.
  • S SalarSoft

    One of our former staff wrote this professional IF clause in VB.NET(Hell language) IF TextBox1.Text=1 or 2 or 3 THEN ' Go to hell END IF :wtf: I tried to write codes like this, but couldn't. Can you help to write? :omg:

    V Offline
    V Offline
    Vasudevan Deepak Kumar
    wrote on last edited by
    #21

    SalarSoft wrote:

    VB.NET

    That is why it is Very Bad.

    Vasudevan Deepak Kumar Personal Homepage
    Tech Gossips
    A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

    1 Reply Last reply
    0
    • R Rich Insley

      It's not uncommon at all to see coders express their frustrations in the code they write. For an entertaining afternoon of reading, go to http://www.google.com/codesearch[^] and enter the profanity of your choice. You'd be amazed what people say.

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #22

      :laugh: :laugh: :laugh: :laugh: :laugh: Thanks for the link, I needed a good laugh. ;)

      INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

      1 Reply Last reply
      0
      • R Rich Insley

        It's not uncommon at all to see coders express their frustrations in the code they write. For an entertaining afternoon of reading, go to http://www.google.com/codesearch[^] and enter the profanity of your choice. You'd be amazed what people say.

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #23

        JohnnyLocust wrote:

        http://www.google.com/codesearch

        Very interesting. Put in my name and found an old Java program I wrote back in college.

        "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

        1 Reply Last reply
        0
        • CPalliniC CPallini

          Nope. http://www.codeproject.com/script/Forums/View.aspx?fid=392254&msg=2393634[^] :-D

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          [my articles]

          U Offline
          U Offline
          User 2558377
          wrote on last edited by
          #24

          This kind of thing is standard shortcut syntax in COBOL (or was when I last used COBOL many years ago): IF X = 1 OR 2 THEN... is the same as IF X = 1 OR X = 2 THEN... The big gotcha comes when you add a NOT into the mix. All new COBOL programmers would at some point write a statement like: IF X NOT = 1 OR 2 THEN.. which unfortunately expands to IF X NOT = 1 OR X NOT = 2 THEN.. so the condition is always satisfied. Some of those beginners learn from the experience and don't make the mistake again. Others, however....

          CPalliniC 1 Reply Last reply
          0
          • U User 2558377

            This kind of thing is standard shortcut syntax in COBOL (or was when I last used COBOL many years ago): IF X = 1 OR 2 THEN... is the same as IF X = 1 OR X = 2 THEN... The big gotcha comes when you add a NOT into the mix. All new COBOL programmers would at some point write a statement like: IF X NOT = 1 OR 2 THEN.. which unfortunately expands to IF X NOT = 1 OR X NOT = 2 THEN.. so the condition is always satisfied. Some of those beginners learn from the experience and don't make the mistake again. Others, however....

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #25

            Member 2560472 wrote:

            Some of those beginners learn from the experience

            ...and quicky abandon COBOL. :laugh:

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            [my articles]

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • R Rich Insley

              It's not uncommon at all to see coders express their frustrations in the code they write. For an entertaining afternoon of reading, go to http://www.google.com/codesearch[^] and enter the profanity of your choice. You'd be amazed what people say.

              T Offline
              T Offline
              TheGreatAndPowerfulOz
              wrote on last edited by
              #26

              Buttmunch

              Silence is the voice of complicity. Strange women lying in ponds distributing swords is no basis for a system of government. -- monty python Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay

              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