• (unregistered)

    I was thinking more along the lines of:

    <font color="#0000ff">Function</font> <font color="#a52a2a">Catwoman ( strHalleBerry )
    </font>

  • (cs)

    The original post of this code inspired my co-worker to name a function of his batman.  Yes, it's acutally used in production.  Observe the beautiful snippet.

    function Batman() {
    ...
    if(!elem.attributes['noHack'])
    elem.onchange=funkify(elem.onchange);
    ...
  • (unregistered)

    <font face="Courier New" size="2">if (!$handle = @fopen($config[file], "r"))
        die('I know a life of crime led me to this sorry fate... but I believe society made me do it.');</font>

  • (cs) in reply to

    This line is a WTF in itself, unless I'm way off base..

    <font face="Courier New">If IsNull(strFileName) Then If Len(strFileName) < 1 Then Exit Function</font>

  • (unregistered)

    Batman() is an indentity function. A secret identity function.

    The true function's name is BruceWayne().

    Get it??? Please tell me somebody got it.

  • (cs) in reply to Maurits

    Maurits:
    This line is a WTF in itself, unless I'm way off base..
    <FONT face="Courier New">If IsNull(strFileName) Then If Len(strFileName) < 1 Then Exit Function</FONT>


    You are correct.  It's at least overly redundant.  If not moreso.

  • (unregistered) in reply to Maurits
    Maurits:
    This line is a WTF in itself, unless I'm way off base..

    <font face="Courier New">If IsNull(strFileName) Then If Len(strFileName) < 1 Then Exit Function</font>



    haha clowned  
  • (cs) in reply to Jeremy Morton
    <DIR><FONT color=#000080 size=2>

    // always save twice, if you know what I mean
    BatManuel().Save();
    BatManuel().Save();

    Okay, I'm done with my jokes...

    </DIR></FONT>
  • (cs) in reply to Scott
    Scott:
    The original post of this code inspired my co-worker to name a function of his batman.  Yes, it's acutally used in production.  Observe the beautiful snippet.
    function Batman() {
    ...
    if(!elem.attributes['noHack'])
    elem.onchange=funkify(elem.onchange);
    ...

    And I couldn't resist doing it again with a couple of internal functions:
    [code language="c#"]
    public void Batman(string s, string batmobile)
    public void Robin(string s, int i, string batmobile)
    [/code]
    Yes, the daily WTF has truly inspired me. And that's just scary and wrong.

  • (cs) in reply to Scott
    Scott:
    The original post of this code inspired my co-worker to name a function of his batman.  Yes, it's acutally used in production.  Observe the beautiful snippet.
    function Batman() {
    ...
    if(!elem.attributes['noHack'])
    elem.onchange=funkify(elem.onchange);
    ...

     

    [:D]  That's funny - I say that because I don't have to debug his code[:P]

    I think, as a white-male-geek, that the 'funkify' method could help me with the ladies.

  • (cs) in reply to

    :
    I was thinking more along the lines of:

    <FONT color=#0000ff>Function</FONT> <FONT color=#a52a2a>Catwoman ( strHalleBerry )
    </FONT>

    And what do you intend to do with this string?  Scan it?[8-|] Parse it?[;)]  Invert it?[:P]

    Careful that you don't overflow your buffer...[:$]

  • (unregistered)

    You could have called this thread 'Batman() returns'

    <FONT style="BACKGROUND-COLOR: #efefef"></FONT> 

    <FONT style="BACKGROUND-COLOR: #efefef">I wonder if this code would run on Linux, or if it would take issue with the Penguin()</FONT>

  • (unregistered) in reply to
    :

    You could have called this thread 'Batman() returns'

    Actually, now that I look at it more closely, I see that Batman() doesn't return anything. Unless I just don't know that language well enough.

  • (cs) in reply to

    It does return someting. In VBScript (as well as normal VB), you return a value by assigning to the function name. Hence Batman = False makes the function return false (note that it doesn't end the function).

    Thank god VB.NET also supports more conventional return syntax.

  • (unregistered) in reply to Unforgiven

    Aah yes, I see now that it's VBScript rather than VB... I was looking for an 'As SomethingOrOther' after 'function Batman()' and when I didn't see that, thought that perhaps a Function really is just a Sub when it doesn't say what sort of object it's returning. But of course As doesn't even work in VBScript so it's no wonder that it isn't there. (I haven't written much VB or VBScript, so I don't know if the 'As SomethingOrOther' is required in VB, but I know I had to remove them to port the code to VBScript.)

  • (cs) in reply to Unforgiven

    Yes, but it still supports the older as well, adding to the confusion that is VB.NET.

  • (unregistered) in reply to Unforgiven
    Unforgiven:

    Thank god VB.NET also supports more conventional return syntax.


    Amen to that! I've been programming in VB for a few years now, and we moved to .NET a few months ago, Return makes WAY more sence!
  • (unregistered)

    My Hero

  • (unregistered)

    Batman, who cares? But inserting values into a database without using bind variables, how 1990.

  • (unregistered) in reply to

    In fact, in VB, if a function does not have a return type, it gets defaulted to Variant.

  • (cs)

    Ah, I remember the times when I used silly function names:

    void ReturnSomeThings();

    and

    void ReturnNearlyAllThings();

    Gladly that was a personal project, and never had to be handed over to anyone [:)]

Leave a comment on “Function Batman() (Again)”

Log In or post as a guest

Replying to comment #:

« Return to Article