Mar.13.2017 -- CAlive to introduce a flexible this, static {..} blocks, and new validate keyword

10 views
Skip to first unread message

Rick C. Hodgin

unread,
Mar 13, 2017, 9:49:58 PM3/13/17
to caliveprogra...@googlegroups.com
CAlive will introduce the ability to assign contextual values to this, allowing for dynamic data set manipulation while in a method.  CAlive will also introduce the ability to call non-static members statically, enabling a new static {..} block to run when called statically.  CAlive will also introduce a new validate keyword to handle this values which are still NULL.  The validate keyword works like return, except it returns conditionally only when this is NULL.  If this has a valid value, it will continue on and behave as a nop.

    class CXyz
    {
    public:
        CXyz();
        ~CXyz();

        int    abc             (int a, int b, int c);
        CXyz*  find_instance   (int a);

    private:
        static locked builder<CXyz> instances;   // Accessible to static functions
    }

    int CXyz::abc(int a, int b, int c)
    {
        static {
            this = CXyz::find_instance(a);
            validate -1;   // If this is still NULL, then it returns -1
        }
    }

    int main(int argc, char* argv[])
    {
        CXyz::abc(1, 0, 0);
    }

These will enable runtime settings to be employed dynamically, bringing forth a wide selection of data processing abilities.

Thank you,
Rick C. Hodgin

Reply all
Reply to author
Forward
0 new messages