Difference between revisions of "Talk:Making a Password Protected Door"

From ComputerCraft Wiki
Jump to: navigation, search
(In response to 24.20.222.206 who reverted my changes and commented "Make code better, again")
(In response to 24.20.222.206 who reverted my changes and commented "Make code better, again")
Line 5: Line 5:
 
Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop?
 
Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop?
 
And assuming ''that'' is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?
 
And assuming ''that'' is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?
<b>24.20.222.206</b>
 
 
  <pre>
 
  <pre>
 +
24.20.22.206:
 
  Loop uses more memory. Also, there's no difference, do you really care that much?
 
  Loop uses more memory. Also, there's no difference, do you really care that much?
 
  </pre>
 
  </pre>

Revision as of 02:51, 16 April 2012

In response to 24.20.222.206 who reverted my changes and commented "Make code better, again"

How is it 'better' to leave the computer running when it's not needed? Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop? And assuming that is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?

 24.20.22.206:
 Loop uses more memory. Also, there's no difference, do you really care that much?