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. What does it do?

What does it do?

Scheduled Pinned Locked Moved The Weird and The Wonderful
question
8 Posts 6 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.
  • B Offline
    B Offline
    bigbrownbeaver
    wrote on last edited by
    #1

    Private Sub donothing(param as Object) End Sub

    C V P C 4 Replies Last reply
    0
    • B bigbrownbeaver

      Private Sub donothing(param as Object) End Sub

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      I must say it is well-self-documented-code! :-D Anyway, IMHO, NULL operations are useful at times. :)

      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.

      1 Reply Last reply
      0
      • B bigbrownbeaver

        Private Sub donothing(param as Object) End Sub

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

        bigbrownbeaver wrote:

        What does it do

        The name of the method itself explains it. :-D

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

        1 Reply Last reply
        0
        • B bigbrownbeaver

          Private Sub donothing(param as Object) End Sub

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          It's an early attempt at a partial method[^].

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          1 Reply Last reply
          0
          • B bigbrownbeaver

            Private Sub donothing(param as Object) End Sub

            C Offline
            C Offline
            Cristian Amarie
            wrote on last edited by
            #5

            I know one better.void Class::Function() { bool result = true; try { } catch(...) { result = false; } return result; }

            Nuclear launch detected

            C X 2 Replies Last reply
            0
            • C Cristian Amarie

              I know one better.void Class::Function() { bool result = true; try { } catch(...) { result = false; } return result; }

              Nuclear launch detected

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              That's an option. :)

              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.

              1 Reply Last reply
              0
              • C Cristian Amarie

                I know one better.void Class::Function() { bool result = true; try { } catch(...) { result = false; } return result; }

                Nuclear launch detected

                X Offline
                X Offline
                Xpnctoc
                wrote on last edited by
                #7

                Uh..... that code wouldn't even pass the compiler. You can't return a boolean value in a method declared as type "void".

                C 1 Reply Last reply
                0
                • X Xpnctoc

                  Uh..... that code wouldn't even pass the compiler. You can't return a boolean value in a method declared as type "void".

                  C Offline
                  C Offline
                  Cristian Amarie
                  wrote on last edited by
                  #8

                  True... the return type was boolean. But I posted the example to see how much code and runtime overhead you need to return true from a function that does nothing.

                  Nuclear launch detected

                  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