Thread: Snake
View Single Post
  #13  
Old 04-04-2009, 08:56 AM
The_Blue_Cracka The_Blue_Cracka is offline
Blonk
The_Blue_Cracka's Avatar
Join Date: Nov 2004
Location: Pennsylvania
Posts: 147
The_Blue_Cracka is on a distinguished road
Send a message via AIM to The_Blue_Cracka
Quote:
Originally Posted by xXziroXx View Post
You're saying that you prefer using magic numbers instead of true booleans? Using true/false is a widely accepted convention in computer science.


Extraneous information:

There's no real reason why 0 is false and 1 is true. It just happened; that's why it's good practice to use true/false. Apart from better communicating your intention, Stefan might go mad and change the engine so that the number 7 is true and number 3 is false.
In many cases 1 is true and 0 is false. More specifically, 1 is known as "on" and 0 is known as "off". Computers only recognize one main function, and that's whether or not there's electricity flowing. It converts this fast-paced data in form of binary which is the most basic step of humanizing the machine.

0 is 0
1 is 1
10 is 2
11 is 3
etc.

This information is then utilized accordingly to perform specific actions.
__________________
2 kewl 4 an sigantrur!1
Reply With Quote