Changes between Version 34 and Version 35 of ResumedC


Ignore:
Timestamp:
Jul 1, 2009, 6:55:07 PM (16 years ago)
Author:
Thanatermesis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ResumedC

    v34 v35  
    377377 ,,Maybe this sounds strange by doing it this way but if ''var'' is equal to 0, then the result of the '''()''' is 1 (true), if you don't understand why is 1 or how this works, you need to start reading a new book of C again...,,
    378378
     379
     380==== The , Operator ====
     381It can be used specially to include multiple operators, like in a for statement:
     382{{{
     383#!C
     384for (two = 0, three = 0 ; two < 10 ; two +=2, three += 3)
     385}}}
     386
     387==== The ?: Construct ====
     388It can be used like a replacement of ''if, else...'' but also specially to set values, like:
     389{{{
     390#!C
     391amount_owed = (balance < 0) = 0 : balance;
     392#define min(x,y) ((x) < (y) ? (x) : (y))
     393}}}
    379394
    380395