mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Update style-guide to use new style
This commit is contained in:
		
							parent
							
								
									fb7836d87b
								
							
						
					
					
						commit
						f1e6bc2eaa
					
				| @ -273,17 +273,17 @@ No:: | ||||
|         })); | ||||
| 
 | ||||
| For ``if`` blocks which have an ``else`` or ``else if`` clause, the ``else`` should be | ||||
| placed on it's own line following the previous closing parenthesis.  The | ||||
| parenthesis for the else block should follow the same rules as the other | ||||
| conditional control structures. | ||||
| placed on the same line as the ``if``'s closing brace. This is an exception compared | ||||
| to the rules of other block-like structures. | ||||
| 
 | ||||
| Yes:: | ||||
| 
 | ||||
|     if (x < 3) { | ||||
|         x += 1; | ||||
|     } | ||||
|     else { | ||||
|     } else if (x > 7) { | ||||
|         x -= 1; | ||||
|     } else { | ||||
|         x = 5; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| @ -296,7 +296,8 @@ No:: | ||||
| 
 | ||||
|     if (x < 3) { | ||||
|         x += 1; | ||||
|     } else { | ||||
|     } | ||||
|     else { | ||||
|         x -= 1; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user