Version 1 of conv

Updated 2003-05-12 10:51:26

Category Dev. Tools

A small, but useful, tool for converting numbers to and from different formats (binary, hex, oct, dec, char). Written in C, so not really directly related to Tcl, but was told on IRC that it might be good to post here nonetheless. If I made the tool today I'd most definitely write it in Tcl. --setok

Get it from http://people.fishpool.fi/~setok/products/conv.tar.gz


RS Note however that expr and format an interactive tclsh, or an interactive console in any Tk app, can do these tasks pedestrianly, which I often use, instead of bothering to search for (or write) a tool:

 % expr 0x4711 ;# hex to dec: just prefix 0x
 18193
 % expr 01234567 ;# octal to dec: just prefix a zero (while the feature is still there :)
 342391
 % format %o 0x4711 ;# any to oct/hex, use % format
 43421