Re:Show HN: CPU simulator in 60 lines of code
by SeldomSoup on Tuesday October 13, 2015 @01:19PM
(#10381929)
With the current code, you would need a counter increment for every if statement.
[ Parent
| on HN ]
Re:Show HN: CPU simulator in 60 lines of code
by rootlocus on Wednesday October 14, 2015 @03:59AM
(#10385460)
And with the else-if code you would need a counter increment for every else-if statement
Re:Show HN: CPU simulator in 60 lines of code
by SeldomSoup on Wednesday October 14, 2015 @03:06PM
(#10388669)
No, you'd just need one increment after all of them. An increment in every else-if block is redundant because only one condition can be executed per loop.