top | item 16535317

(no title)

verdie-g | 8 years ago

I didn't know about the idiom of using [+] for zeroing. Are the cells supposed to be signed ?

discuss

order

Doxin|8 years ago

Signedness depends on your interpreter. In practice it hardly matters since there's no print function anyways, so if you want 2s complement you'll end up implementing it yourself anyways.

[+] should always overflow to 0 at some point, which is entirely doable for 8 bit, but less so for 32bit. as for choosing between [-] and [+] you'll just have to guesstimate if 0 or intmax is on average closer to your value.