If not now - when?

Hi,

Any ideas on how to write the saying "If Not Now - When?" in C++ code?

/Thomas
cout << "If Not Now - When?";
Last edited on
Perhaps I wasnt super clear with my questions, I was more thinking in translating the saying into faux code but still working code? Something like:

if !(now()) then when()....

1
2
if (!now())
    when();
Just a tangent: if you're planning to use this in marketing material, be aware that you will get mixed responses from programmers. Some of us roll our eyes at this kind of stuff.

That said, my take would be now() || when(), which I admit is less obvious, but has the advantage of being slightly nerd-snipey.

-Albatross
Hi, nope, not for marketing. Just making a little sign for my office wall :-) A bit nerdy perhaps... I used to program C++ 30 years ago (sic) but haven't kept up with the programming and therefore a bit rusty. Was looking for the most optimized/cryptic version of the saying, in C++ code.
1
2
3
4
5
6
7
8
9
10
11
#include <chrono>

int main()
{
while( now || when() )
    {
        sleep_until(ready);
    }

    return 0;
}


What's ready? Wake up to yourself!
!Now() ? When() : Never();
So Now() implies Never()? Surely Now() would imply Now(), and perhaps Already().
Topic archived. No new replies allowed.