<div dir="ltr">maybe this can help you make a full vanilla abstraction<div><br></div><div><a href="https://github.com/porres/pd-else/blob/master/Classes/Abstractions/hex2dec.pd">https://github.com/porres/pd-else/blob/master/Classes/Abstractions/hex2dec.pd</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em ter., 19 de jan. de 2021 às 21:22, oliver <<a href="mailto:oliver@klingt.org">oliver@klingt.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">hi,<br>
<br>
i'm trying to convert arbitrary hexadecimal numbers to decimal ones, <br>
preferably with vanilla objects.<br>
<br>
while it's easy to do it the other way round with [makefilename], i'm <br>
facing a peculiar problem from hex --> dec when the letter E is present <br>
and followed by a number.<br>
<br>
my approach would be to take a hex number, interpret it as a symbol, get <br>
each hex-digit's ascii value, and do the conversion from there<br>
<br>
let's take the hex number 27E5 as an example<br>
<br>
no matter what sort of conversion i try ([symbol], [list tosymbol], <br>
[makefilename], [fudiformat]), PD always interprets it as a decimal <br>
number with an exponent, so<br>
<br>
[27E5(<br>
|<br>
makefilename %s<br>
|<br>
[print]<br>
<br>
will give me "symbol 2.7e+006" in the console (or in a symbol atom).<br>
<br>
(of course a number like 27A5 or 275E expands with no problem to a <br>
straight symbol and can then be ascii-fied)<br>
<br>
is there anything i can do to make PD take 27E5 as a literal symbol <br>
rather than a float ?<br>
<br>
best<br>
<br>
oliver<br>
<br>
-- <br>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\<br>
/////////////// <a href="http://pendler.klingt.org" rel="noreferrer" target="_blank">http://pendler.klingt.org</a> //////////////<br>
\\\\\\\\\\\\\\\ <a href="http://oliver.klingt.org" rel="noreferrer" target="_blank">http://oliver.klingt.org</a>  \\\\\\\\\\\\\\<br>
////////////////////////////////////////////////////////<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div>