Talk:CodingStandards: Difference between revisions
From Pickwiki
Jump to navigationJump to search
Ternary assignment preferred |
(No difference)
|
Revision as of 14:07, 15 May 2020
Regarding 2.10 "Avoid using obscure and unfamiliar coding styles", the example shows ternary assignment as "BAD"; that is, obscure and unfamiliar to most PICK programmers. I actually prefer to use ternary assignment instead of multi-line IF-THEN-ELSE logic. Ternary assignment helps to avoid the error where the variable name is mis-typed in the ELSE clause.