Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: lisabeern on July 16, 2010, 11:48:48 AM



Title: loop {} in main.cpp
Post by: lisabeern on July 16, 2010, 11:48:48 AM
i'm almost dying asking this question, because the answer must be obvious, and somehow i've never encountered this before!

in main.cpp of the bitcoin client, line 2667,2668 read:

        loop

        {


what is that? it's not a for-loop, a while loop, a do-while loop. is it some sort of macro?

with thanks (and a thousand apologies)

lisa


Title: Re: loop {} in main.cpp
Post by: Svick on July 16, 2010, 12:18:14 PM
Yes, it's a macro defined in util.h (http://bitcoin.svn.sourceforge.net/viewvc/bitcoin/trunk/util.h?revision=105&view=markup#l21) as

Code:
#define loop for (;;)