Talk:Control Structures: Difference between revisions
Jump to navigation
Jump to search
imported>Bale No edit summary |
imported>StDoodle No edit summary |
||
Line 10: | Line 10: | ||
*That use of switch statements was one of the things zarqon and I pushed for when we were cajoling veracity to add it as a mafia feature. It is so much more readable to use a single switch statement than 6 "else if" statements. --[[User:Bale|Bale]] 23:33, 3 May 2010 (UTC) | *That use of switch statements was one of the things zarqon and I pushed for when we were cajoling veracity to add it as a mafia feature. It is so much more readable to use a single switch statement than 6 "else if" statements. --[[User:Bale|Bale]] 23:33, 3 May 2010 (UTC) | ||
Er, that is to say, I knew how to use them with a top-level variable, but not that you could omit that and use a sep. expression each time... and I could swear I tried to use expressions that way (apparently you can't do both at once!). :P --[[User:StDoodle|StDoodle (#1059825)]] 02:29, 4 May 2010 (UTC) |
Revision as of 02:29, 4 May 2010
Ok, old version no longer needed. A couple cleanup requests:
- add return
- change looping to flow control OR add a separate section for continue, break & return
- the above 3 should each have a lv3 heading
--StDoodle (#1059825) 18:57, 18 April 2010 (UTC)
Never mind; the stuff, I fixed it. --StDoodle (#1059825) 19:21, 18 April 2010 (UTC) (Though further info for break, continue & return might be nice).
I was not aware of that use of switch statements, thanks! --StDoodle (#1059825) 13:55, 3 May 2010 (UTC)
- That use of switch statements was one of the things zarqon and I pushed for when we were cajoling veracity to add it as a mafia feature. It is so much more readable to use a single switch statement than 6 "else if" statements. --Bale 23:33, 3 May 2010 (UTC)
Er, that is to say, I knew how to use them with a top-level variable, but not that you could omit that and use a sep. expression each time... and I could swear I tried to use expressions that way (apparently you can't do both at once!). :P --StDoodle (#1059825) 02:29, 4 May 2010 (UTC)