• (cs)

    I don't see how they got around the problem of "=" being contextually overloaded to equality in logical expressions and assignment otherwise. In fact, I'll go out on a limb and say that it can't be done. So, wouldn't they have to put up with "==" in the "If MsgBox(..." line?

  • (cs)

    this is crazy ... what about putting a semi-colon after each statement, as well?  Or declarations being "backwards" (i.e., "integer i" versus "dim i as integer")?

    This can't possibly work .. and if it does, we must be talking simple 3 line programs here.  Or they keep compiling and editing until all the warnings and errors go away ....

    At least the original VB code had "Option Explicit" declared ! 

  • (cs)

    Am I correct that if you answer 'No' to the question 'Are you alright?' it will show a messagebox with 'Thats very Good!' and vice versa? If so, that is obviously a WTF ;)

  • (cs)

    I would believe the semicolons (at least for the code shown above), but as zinglons_ale says, the "=" cannot possibly work.  Of course the variable declarations only work for "dim foo as integer", but what the heck.

    A very... creative... way to convert VB to C++!

  • (cs)

    I can't believe this was used in a real solution. This can work (with issues) just for a very simple piece of VB code and that's all.
    If this were used in a real solution then I would call it a WTF. But I'm sure this is just the result of a someone playing. A Joke, no more. I can't call this a WTF unless I had evidence this was used in production code, but I seriously doubt such evidence could exist.

  • (cs)

    Ok, where do I start? First of all, I’ll admit to submitting this piece of code (quite some time ago), but I did state on the email that this was not a real wtf. It was half the result of a late night of boredom, the full result can be found at http://www.firepack.com/downloads.php. Secondly, the editor seems to have edited the code some what, you’re right about the "=", but it was never supposed to be an equals sign, it was a minus, which I’ll think you’ll find works fine. Anyway, I apologize for the "fake" wtf, even though I did state that it was not a real wtf in the email.

  • (cs)

    I was so shocked that this would be in production code that I initially gave it the thread a high rating.

    I'm actually glad to see that it wasn't a real WTF.

    And at least I can change my rating.

  • (cs) in reply to zinglons_ale

    I think you could get MsgBox(some params) = vbOk to work. Just make MsgBox an object with overloaded operator() and operator= methods. Of course, then you'd lose the ability to assign things to MsgBox, but you don't actually need that.

  • (cs)

    Just shows that you need a professional C++ developer with a good C++ compiler to write decent VB code. Nothing wrong with that since it's a good way to force VB code to perform a lot better.

  • (cs)

    Shame on you for tricking us [:(] I was about to go hunt that person down and slap them (I always read the code before I read anything else on the post, so I was unaware that it was fake [:O]).







    The emoticons look like little hamburgers when you insert them. Ha.

  • (unregistered)

    Now i know why they (vb programmer)  said that vb is now comparable in performace with C++.

  • aakash (unregistered)

    [li][;)][:|][:S][:^)][pi][}][}]

Leave a comment on “VB++”

Log In or post as a guest

Replying to comment #25944:

« Return to Article