In article <45luqe$f...@aix11.hrz.uni-oldenburg.de>,
Edwin Litterst <e...@fiz-karlsruhe.de> wrote:
>I tried (invain) to "convert" a character to a hexadecimal representation.
>What I want is a way to create e.g. the string 61 (hex. value) from e.g. the character a.
>How is this done? I have tried format but %x doesn't seem to do that.
format works on numbers, you need to use scan first to go from
char to ascii code...
regards
dl
--
Laurent Demailly * http://hplyot.obspm.fr/~dl/ * Linux|PGP|Gnu|Tcl|... Freedom
Prime#1: cent cinq mille cent cinq milliards cent cinq mille cent soixante sept
: I tried (invain) to "convert" a character to a hexadecimal
: representation. What I want is a way to create e.g. the string 61
: (hex. value) from e.g. the character a.
I think you have to go by way of the decimal representation:
% info tclversion
7.3
% scan a %c code ; format %x $code
61
%
--
John Rickard
I tried (invain) to "convert" a character to a hexadecimal representation.
What I want is a way to create e.g. the string 61 (hex. value) from e.g. the character a.
How is this done? I have tried format but %x doesn't seem to do that.
Thanks in advance,
Eddi