Liste des Groupes | Revenir à cl c |
Bart wrote:Well, personally I don't like that repetition, that's why I mentioned the patterns. You're writing 'n' 5 times, '==' 5 times, and you're writing out the numbers 1, 2, 3, 4, 5.ral clear patterns here: you're testing the same variable 'n' againstso in short this groupo seem to have no conclusion but is tolerant foir various approaches as it seems
several mutually exclusive alternatives, which also happen to be
consecutive values.
>
C is short of ways to express this, if you want to keep those
'somethings' as inline code (otherwise arrays of function pointers or
even label pointers could be use
imo the else latder is like most proper but i dont lkie it optically,
swich case i also dont like (use as far i i remember never in my code,
for years dont use even one)
so i persnally would use bare ifs and maybe elses ocasionally
(and switch should be mended but its fully not clear how,
as to those pointer tables im not sure but im like measurad it onece and it was (not sure as to thsi as i dont remember exactly) slow maybe dependant on architecture so its noth wort of use (if i remember correctly)
Les messages affichés proviennent d'usenet.