ID:4560
 
It isn't common knowledge because, as far as I know, it isn't documented, but did you know that BYOND lets you write numbers in hexidecimal form instead of decimal? For example:

//outputs "A" because 0x41 == 65, the ASCII char. code for "A":
world << ascii2text(0x41)


Cool, eh?
</<>
Nifty
You can also precede a decimal number by 0 to use octal.

world.log << 010 // Outputs 8
var/value9 = 09

This should cause a bad number compiler error :P.
Theodis wrote:
You can also precede a decimal number by 0 to use octal.

Wow; why that has never caused me mystery bugs, I don't know (maybe it has). Using extra zeros is the sort of thing I'd be likely to do to line up code.

var/value09 = 09
var/value10 = 10
var/value11 = 11
You can easily line up code with spaces. ;-)

As for octal, I wonder why it's supported at all. Binary support (e.g, b0000100001100010 for the 16-bit integer 2146) is a billion times more useful.
I find the best way to line up coding is with tabs. (In my opinion. [to avoid little bitchy "blehblehbleh no you can do this this is better blehblehbleh I can't live my life without causing extremely trivial and immature arguements over opinions blehblehbleh" replies.])
Tab works fine most of the time however you'll only be able to align the left side of the number which isn't what Iain was going for. To get the digits to align on the right you need to use spaces.
0x41 == 65, the ASCII char. code for "A"

Kids nowadays can write in ASCII char codes before they can walk. Damn computers.
Ah