program hex;

uses minilib;


var S : string;

begin
	writeln('Hex/Dec command line converter  (c) Small Business Solutions, Mar 96/MCH');
	S := ucase(paramstr(1));
	if S='' then
		writeln('Useage: HEX $xxxx for conversion to decimal, HEX xxx for conversion to hex')
	else
		if S[1]='$' then
			writeln(S+'='+N2Str(Hex2dec(copy(S,2,length(S)))))
		else
			writeln(S+'=$'+minilib.hex(S2Num(S)));
end.
