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. Illogical Logic

Illogical Logic

Scheduled Pinned Locked Moved The Weird and The Wonderful
announcement
9 Posts 8 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.
  • R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #1

    Its just as well we have a logic object here, as the programmer's grasp obviously leaves something to be desired.

    If logic.doLogic(sender, "Update") Then
        flushMessages(sender.Page)
    Else
        flushMessages(sender.Page)
        Exit Sub
    End If
    

    I should qualify, (before someone points it out) that this is at the end of the containing method, so the Exit Sub was redundant)

    K L 2 Replies Last reply
    0
    • R Rob Grainger

      Its just as well we have a logic object here, as the programmer's grasp obviously leaves something to be desired.

      If logic.doLogic(sender, "Update") Then
          flushMessages(sender.Page)
      Else
          flushMessages(sender.Page)
          Exit Sub
      End If
      

      I should qualify, (before someone points it out) that this is at the end of the containing method, so the Exit Sub was redundant)

      K Offline
      K Offline
      Keith Barrow
      wrote on last edited by
      #2

      Pehaps the original coder thought

      If not logic.doLogic(sender, "Update") Then
      Exit Sub
      End If

      would mean his code is not logical, because of the Not logic statement :laugh:

      Sort of a cross between Lawrence of Arabia and Dilbert.[^]
      -Or-
      A Dead ringer for Kate Winslett[^]

      1 Reply Last reply
      0
      • R Rob Grainger

        Its just as well we have a logic object here, as the programmer's grasp obviously leaves something to be desired.

        If logic.doLogic(sender, "Update") Then
            flushMessages(sender.Page)
        Else
            flushMessages(sender.Page)
            Exit Sub
        End If
        

        I should qualify, (before someone points it out) that this is at the end of the containing method, so the Exit Sub was redundant)

        L Offline
        L Offline
        Lutoslaw
        wrote on last edited by
        #3

        Not the first horror of this type. I think that VB .NET programmers miss a RegardlessOf keyword. Usage:

        RegardlessOf boolean-expression
        a code block which is always executed
        End RegardlessOf

        Greetings - Jacek

        E J 2 Replies Last reply
        0
        • L Lutoslaw

          Not the first horror of this type. I think that VB .NET programmers miss a RegardlessOf keyword. Usage:

          RegardlessOf boolean-expression
          a code block which is always executed
          End RegardlessOf

          Greetings - Jacek

          E Offline
          E Offline
          ekolis
          wrote on last edited by
          #4

          A "whenever" keyword? What, is that for even simpler declaration of event handlers than VB already has?

          L 1 Reply Last reply
          0
          • E ekolis

            A "whenever" keyword? What, is that for even simpler declaration of event handlers than VB already has?

            L Offline
            L Offline
            Lutoslaw
            wrote on last edited by
            #5

            I used a wrong word, it should be "regardless". I knew that sth was not right, thanks.

            Greetings - Jacek

            M 1 Reply Last reply
            0
            • L Lutoslaw

              I used a wrong word, it should be "regardless". I knew that sth was not right, thanks.

              Greetings - Jacek

              M Offline
              M Offline
              Manfred Rudolf Bihy
              wrote on last edited by
              #6

              IMHO RegardlessOf is a very good choice you made. Especially when it's syntax would be RegardlessOf( condition ){ ... } Cheers!

              "With sufficient thrust, pigs fly just fine."

              Ross Callon, The Twelve Networking Truths, RFC1925

              A 1 Reply Last reply
              0
              • L Lutoslaw

                Not the first horror of this type. I think that VB .NET programmers miss a RegardlessOf keyword. Usage:

                RegardlessOf boolean-expression
                a code block which is always executed
                End RegardlessOf

                Greetings - Jacek

                J Offline
                J Offline
                Julien Villers
                wrote on last edited by
                #7

                I'm lovin' it! Put it right next to DoNothingWithThese(variable parameters). :laugh:

                'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail

                D 1 Reply Last reply
                0
                • M Manfred Rudolf Bihy

                  IMHO RegardlessOf is a very good choice you made. Especially when it's syntax would be RegardlessOf( condition ){ ... } Cheers!

                  "With sufficient thrust, pigs fly just fine."

                  Ross Callon, The Twelve Networking Truths, RFC1925

                  A Offline
                  A Offline
                  AdamEcc
                  wrote on last edited by
                  #8

                  It also needs

                  AsIf unmeetable-condition
                  a code block which can never execute
                  End AsIf

                  1 Reply Last reply
                  0
                  • J Julien Villers

                    I'm lovin' it! Put it right next to DoNothingWithThese(variable parameters). :laugh:

                    'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail

                    D Offline
                    D Offline
                    DerekT P
                    wrote on last edited by
                    #9

                    and that essential scope modifier, "Unused"... as in

                    public unused Boolean FlagSomething = false;

                    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