Difference between revisions of "Talk:C Coding Standard"

(New page: --~~~~ Possibly the most important item in a C coding standard is "do not use jump instructions". In other words, ''goto'' and ''continue'' must never be used; ''break'' must never be used...)
 
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
--[[User:Peter gummer|Peter gummer]] 01:14, 22 July 2009 (UTC) Possibly the most important item in a C coding standard is "do not use jump instructions". In other words, ''goto'' and ''continue'' must never be used; ''break'' must never be used except in a ''switch'' statement; and ''return'' must never be used except as the final instruction of a non-void function.
+
'''--[[User:Peter gummer|Peter gummer]]01:14, 22 July 2009 (UTC)''': Possibly the most important item in a C coding standard is "do not use jump instructions". In other words, ''goto'' and ''continue'' must never be used; ''break'' must never be used except in a ''switch'' statement; and ''return'' must never be used except as the final instruction of a non-void function.
 +
 
 +
'''--[[User:Clemahieu|Clemahieu]] 02:42, 22 July 2009 (UTC)''': Hear hear!
 +
 
 +
'''--[[User:Manus|manus]] 16:59, 22 July 2009 (UTC)''': I'll add a section about that, but know that in the Eiffel runtime we have old code where those jump instructions are used quite heavily unfortunately.
 +
 
 +
--[[User:Peter gummer|Peter gummer]] 23:22, 22 July 2009 (UTC) Yes, I know, I've seen it. It really shocked me to see Eiffel programmers writing unstructured code. That's why I mentioned it ;-)

Latest revision as of 14:22, 22 July 2009

--Peter gummer01:14, 22 July 2009 (UTC): Possibly the most important item in a C coding standard is "do not use jump instructions". In other words, goto and continue must never be used; break must never be used except in a switch statement; and return must never be used except as the final instruction of a non-void function.

--Clemahieu 02:42, 22 July 2009 (UTC): Hear hear!

--manus 16:59, 22 July 2009 (UTC): I'll add a section about that, but know that in the Eiffel runtime we have old code where those jump instructions are used quite heavily unfortunately.

--Peter gummer 23:22, 22 July 2009 (UTC) Yes, I know, I've seen it. It really shocked me to see Eiffel programmers writing unstructured code. That's why I mentioned it ;-)