Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

QuakeC Loops and Conditions

From Quake Wiki

Revision as of 19:34, 7 May 2008 by ShoTro (talk | contribs) (Loop construct)

Loops and conditions

Conditional construct

   if( expression )
   {
     statements
   }
   else
   {
     statements
   }


Loop construct

Pre-test loop: Checks the expression before executing the code within the loop.

   while( expression )
   {
     statements
   }

or post-test loop: Check the expression after the first execution.

   do
   { 
     statements
   }while( expression )