Unless and Until
Sun, 23 Mar 2008 10:26:25 -0400 - Author:
When adapting code from a program I managed to stumble upon this construct in C:
until( (dh > h) || ((dh == h) && (dl > l)) ) {
// Code here
}
Apparently it uses macros like these to create that new construct, which exists, by the way, in Ruby and Visual Basic:
#define unless(x) if(!(x)) #define until(x) while(!(x))It's just another case where macros come to the rescue when a need to extend the C programming language arises.
