Structure and Interpretation of Computer Programmers

I make it easier and faster for you to write high-quality software.

Tuesday, May 28, 2013

I do the stupid so you don’t have to

So you want to use bc for some hexadecimal maths. You set the input base:


and the output base:


Oops! I just set it to output in base 22. I’d already set it to think numbers were input in hexadecimal, and that’s how it handled the “16” in my obase command. Either do this:


Or this:

posted by Graham at 14:48  

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress