• I am working in a "Object Oriented" language called DataFlex.

    But there is a little catch, functions cannot return Objects. Write a class, then write a function header that uses that class, tell it to return an object of that class, and then try to instantiate that class in that function. Return the object.

    Lets compile!! Compiler error!

    My beautiful tells me I can only return primitive types!


    Meh 😞

  • I can see this becoming spectacularly useless. There I thought REALbasic had a lousy OO implementation ...

  • How about a reference/pointer to it? Perhaps the compiler thinks it's smarter then the programmer and returning an object would be less efficient? Just a wild stab in the dark.

  • You are actually right. They do that on a number of occaissons.

    They use "Handles" (prefixed by h, hungarian notation) which are references to Objects.

     Get SQLFileConnect of oSQLHandler Vehicle.File_number to hDbc
            If (hDbc <> 0) Begin
                // Open a statement
                Get SQLOpen of hDbc to hStmt
                If (hStmt <> 0) Begin
                    // Execute the statement, we do it only once so use direct execution                                   
                    Get CreateSQLQuery sConVehicleType False iPageNumber to sQuery
                    Send SQLExecDirect of hStmt sQuery
                        Get SQLFetch of hstmt to iFetchResult

  • That looks like VB with a few keywords changed to other words.

    Only even more wtf-y

  • @Ice^^Heat said:

    Get CreateSQLQuery sConVehicleType False iPageNumber to sQuery

    Say what? 



    If mixed metaphors were illegal, I'd be having an indigestion.

  • Get oPizza of oPizzaGuy to oMe

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.