Re: wait state

From: Brian Gray (
Date: 11/02/99

At 07:59 PM 11/2/99 +0000, Nocturnal Occulto wrote:
>#define WAIT_STATE(ch, cycle) do { GET_WAIT_STATE(ch) = (cycle); }
>Curious whats the point with the do/while thing, why not just a simple
>GET_WAIT_STATE(ch) = (cycle); ?

It's just a trick to get the macro to look more like a function.  All it
really does is force a semicolon at the end of the line.  In this case it's
not needed since there's only one line to the macro (could be
(GET_WAIT_STATE(ch) = (cycle))), but in multi-line blocks, it gets treated
as a single line of code.  Thus...

WAIT_STATE(ch, cycle); no matter the implementation of the macro.

Brian Gray
Systems Programmer/Analyst
Broadband Technologies
(954)351-2120 x862

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST