Follow

question: is it possible to increment any *even* starting number by 1 with this
h interprets a number like it's a hexadecimal number (20 => 0x20 => 32)
O interprets a number like it's an octal number (20 => 020 => 16)
s subtracts 1 from even numbers and adds 1 to odd numbers

rest should be explanatory
computerfairi.es/media/tITjF7r

additionally, interpreting a number with 8 or 9 in it as octal causes the variable to be set to 0 immediately

@boots

Based on that snippet alone? No... the only way to increment OR decrement is with 's'... unless you set n to 40 or 60 then cheat and use 'A' or 'a' to increment-but-not-actually-increment.

Converting to other bases ('h' and 'O') will still keep the number even, and 's' always decrements even numbers.

(Disclaimer: I don't know the nuances of that language... Being stuck in the C family of languages for so long, I am sorry to admit that I don't even recognize it.)

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!