• Sutherlands (unregistered) in reply to abx
    abx:
    :O

    Sorry to break it to you, but

    The toggles... they do nothing

    Sure it does... when the preprocessor runs, the first function toggles whether the macro is defined, and then the second function is defined to return whether the macro is defined.

    So at runtime, it becomes:

    Toggle() {//do nothing//} IsEnabled() {return the opposite of whether the macro was defined at the start of execution}

  • RatDancr (unregistered) in reply to Glenn Lasher

    IMAX is shot at 24fps....Just saying.

  • Bob (unregistered)

    This is great! I'm going to incorporate it into our recruiting test.

  • JDS (unregistered) in reply to Sutherlands

    I'm glad you caugh that, man. We can't let this guy make a brilliant joke at the expense of being partly technically incorrect regarding minor details like that.

    Let's not even cut him some slack and say that the toggle at least doesn't do anything when called at runtime, which is what the main article was all about anyways.

    No, let's call him on it and ruin the joke for the sake of statistical correctness and punditism.

    (BTW, what he said was a pun on "The goggles, they do nothing". I guess I have let you off the hook if you didn't catch that)

  • JDS (unregistered) in reply to Sutherlands
    Sutherlands:
    abx:
    :O

    Sorry to break it to you, but

    The toggles... they do nothing

    Sure it does... when the preprocessor runs, the first function toggles whether the macro is defined, and then the second function is defined to return whether the macro is defined.

    So at runtime, it becomes:

    Toggle() {//do nothing//} IsEnabled() {return the opposite of whether the macro was defined at the start of execution}

    I'm glad you caugh that, man. We can't let this guy make a brilliant joke at the expense of being partly technically incorrect regarding minor details like that.

    Let's not even cut him some slack and say that the toggle at least doesn't do anything when called at runtime, which is what the main article was all about anyways.

    No, let's call him on it and ruin the joke for the sake of statistical correctness and punditism.

    (BTW, what he said was a pun on "The goggles, they do nothing". I guess I have let you off the hook if you didn't catch that)

  • Spencer (unregistered)

    pseudocode for MONEY MAKING PROCESS

    if STOCKS WENT UP YESTERDAY then TRANSFER MONEY TO STOCKS else SELL STOCKS

  • phantasmo (unregistered)

    Damn... I don't get this one... It might be because I'm not familiar with the language, but it might also be that I just don't get... Could someone explain it?

  • Bob (unregistered) in reply to phantasmo
    phantasmo:
    Damn... I don't get this one... It might be because I'm not familiar with the language, but it might also be that I just don't get... Could someone explain it?
    Absolutely not, and that's why noone at all has explained it yet.

    Also, if there's a merciful god then you're about to be banned from the internet for failure to read the three pages of comments, most of which are explaining the problem.

  • phantasmo (unregistered) in reply to Bob

    Ok, ok, sorry. When I finished reading, all I could see below was a ingle comment. I haven't noticed 3 pages of comments existed before I posted.

  • Martin Milan (unregistered)

    That's class!

    For those staring at it in wonder who are perhaps not familiar with the joy of C/C++, yes, they are using compiler directives, and yes, the compiler has usually moved on to bigger and better things by the time the user runs an application...

    (And no, it never stood in hell of working!)

  • karl prosser (unregistered)

    change the caption (to toggle, please edit header file and recompile) and she'll be right mate.

  • Mncb (unregistered) in reply to abx

    Magic :)

  • Allan (unregistered) in reply to abx

    To abx: Jake understood that it did nothing. In fact, that was the entire point of his story!

  • Naveen (unregistered)

    This should be the BEST brainless code I have seen for years. I just couldn't believe my eyes when I read it.

  • Groucho (unregistered) in reply to Allan
    Allan:
    To abx: Jake understood that it did nothing. In fact, that was the entire point of his story!
    And you didn't understand the reference in abx' comment, which indeed was the entire point of it. Playing the wise guy without knowing the most popular running jokes here: brillant!
  • Obloodyhell (unregistered) in reply to Skizz
    Skizz:
    xan:
    The logic is perfect, it's so beguiling!
    I'm sorry, but perfection can only be achieved through use of a wooden table.

    Skizz

    Applied steadily and repeatedly to the forehead? Or perhaps vice-versa?

  • Akim Demaille (unregistered)

    This is perfectly understandable once you understand that the guy made no difference bw static and dynamic computations: just remove the dashes, and /voila/!

  • PPN (unregistered) in reply to abx

    #if(agree) return AGREE #else return NOT_AGREE

Leave a comment on “The Toggle that Wouldn't”

Log In or post as a guest

Replying to comment #:

« Return to Article