ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \hexstringtonumber{..}
@ 2006-06-24 15:29 Peter Münster
  2006-06-24 16:05 ` \hexstringtonumber{..} Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2006-06-24 15:29 UTC (permalink / raw)


Hello Hans,

what is the purpose of \hexstringtonumber{..}?

I would expect something like:

\unprotect
\setvalue{@@uc@@a}{10} \setvalue{@@uc@@A}{10}
\setvalue{@@uc@@b}{11} \setvalue{@@uc@@B}{11}
\setvalue{@@uc@@c}{12} \setvalue{@@uc@@C}{12}
\setvalue{@@uc@@d}{13} \setvalue{@@uc@@D}{13}
\setvalue{@@uc@@e}{14} \setvalue{@@uc@@E}{14}
\setvalue{@@uc@@f}{15} \setvalue{@@uc@@F}{15}

\def\dohexstringtonumber#1#2% FF
  {\the\numexpr\csname @@uc@@#1\endcsname * 16 +
               \csname @@uc@@#2\endcsname\relax}
\protect

\starttext
\hexstringtonumber{1E}
\hexstringtonumber{f5}
\stoptext

But your version just adds a " to the string...

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-24 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-24 15:29 \hexstringtonumber{..} Peter Münster
2006-06-24 16:05 ` \hexstringtonumber{..} Taco Hoekwater
2006-06-24 18:05   ` \hexstringtonumber{..} Peter Münster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).