CLR TVF-: how can we send the optinal parameter

  • Florian Reischl (7/13/2009)


    VB6 is way back for me... As I remember "Nothing" was equivalent to "null" which only worked for complex data types (not Integer, String, ...). Working with optional "Variant" parameters enabled the usage of IsMissing (If IsMissing(myParam) Then...).

    Ah yes - that was it. How do we manage these days without Null, Nothing, Empty and Missing? :laugh:

  • Paul White (7/13/2009)


    Florian Reischl (7/13/2009)


    VB6 is way back for me... As I remember "Nothing" was equivalent to "null" which only worked for complex data types (not Integer, String, ...). Working with optional "Variant" parameters enabled the usage of IsMissing (If IsMissing(myParam) Then...).

    Ah yes - that was it. How do we manage these days without Null, Nothing, Empty and Missing? :laugh:

    Heh, that's right, you just can't have too many ways to say nothing. Err, I mean to say "nothing". 😛

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Thank god for good old C(++) and the possibility to create your own, verbose and friendly programming language:

    #define Please if

    #define Execute (

    #define If _isNull(

    #define Is )

    #define Null ) {

    #define Otherwise } else {

    #define Thanks }

    BOOL _isNull(void* pMem) { return pMem == NULL; }

    // Do work

    void foo(int* pOptional = NULL)

    {

    Please Execute If pOptional Is Null

    // NULL Handling

    Otherwise

    // NOT NULL Handling

    Thanks

    }

    😀

  • Awesome Flo!

  • Florian Reischl (7/14/2009)


    Thank god for good old C(++) and the possibility to create your own, verbose and friendly programming language:

    #define Please if

    #define Execute (

    #define If _isNull(

    #define Is )

    #define Null ) {

    #define Otherwise } else {

    #define Thanks }

    BOOL _isNull(void* pMem) { return pMem == NULL; }

    // Do work

    void foo(int* pOptional = NULL)

    {

    Please Execute If pOptional Is Null

    // NULL Handling

    Otherwise

    // NOT NULL Handling

    Thanks

    }

    😀

    Heck, with a little work you might even be able to make it as readable as VB, Flo! 😀

    (just kidding! Seriously! ...)

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply