Changes between Version 31 and Version 32 of Hacking


Ignore:
Timestamp:
01/14/21 09:50:50 (3 years ago)
Author:
andrew_b
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hacking

    v31 v32  
    288288}}} 
    289289 
     290Avoid initialized and not initialized variables in one declaration. 
     291 
     292'''This is right:''' 
     293{{{ 
     294int a; 
     295int b = 0; 
     296}}} 
     297 
     298'''This is wrong:''' 
     299{{{ 
     300int a, b = 0; 
     301}}} 
     302 
     303Avoid several non-trivial variable initializations in one declaration. 
     304 
     305'''This is right:''' 
     306{{{ 
     307int a = 2 + 5; 
     308int b = 4 * 3 - 1; 
     309}}} 
     310 
     311'''This is wrong:''' 
     312{{{ 
     313int a = 2 + 5, b = 4 * 3 - 1; 
     314}}} 
     315 
    290316=== Helper variables === 
    291317