Jul.23.2019 -- CAlive to introduce do if { } blocks

10 views
Skip to first unread message

Rick C. Hodgin

unread,
Jul 23, 2019, 10:30:05 AM7/23/19
to caliveprogra...@googlegroups.com
CAlive will introduce the do if (...) { } block.  It will allow a test to be added to the initial entry of the block, which is performed one time and only on the initial entry.

Traditional code:

    if (x == 2)
    {
        do {
            // Code here

        } while (lKeepProcessing);
    }

With the do if (...) { } block:

    do if (x == 2)
    {
        // Code here
        
    } while (lKeepProcessing);

It is shorter, more concise, less indented, clearer, encapsulating, and a nice step forward for the language philosophy when such a need exists.

-- 
Rick C. Hodgin

Reply all
Reply to author
Forward
0 new messages