<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>> means it can only take an actual hardcoded string.</div>

<div> </div>

<div>if with "hardcoded" you mean a string constant, then the answer is no. "s" is a pointer to any c string, the const part only means that gensym() promises not to modify the string.</div>

<div>google "const correctness".</div>

<div> </div>

<div>> Can this convert floats to symbols?</div>

<div> </div>

<div>use a char array together with snprintf, e.g.:</div>

<div> </div>

<div>char buf[100];</div>

<div>snprintf("foo-%f", sizeof(buf), someFloatValue); // NOTE: you should check the return value, if you want to be safe, see https://linux.die.net/man/3/snprintf</div>

<div>gensym(buf);</div>

<div> </div>

<div>Christof</div>

<div> </div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 22. März 2019 um 17:31 Uhr<br/>
<b>Von:</b> "Chuckk Hubbard" <badmuthahubbard@gmail.com><br/>
<b>An:</b> Pd-dev <pd-dev@iem.at><br/>
<b>Betreff:</b> Re: [PD-dev] Converting arbitrary strings to symbol in an external</div>

<div name="quoted-content">
<div>Thank you.
<div>I have read it.</div>

<div>I understood that the "const" part of "const char *s) means it can only take an actual hardcoded string. Can this convert floats to symbols?</div>
 

<div class="gmail_quote">
<div class="gmail_attr">On Fri, Mar 22, 2019, 4:19 PM Claude Heiland-Allen <<a href="mailto:claude@mathr.co.uk" onclick="parent.window.location.href='mailto:claude@mathr.co.uk'; return false;" target="_blank">claude@mathr.co.uk</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">Hi Chuckk,<br/>
<br/>
On 22/03/2019 13:59, Chuckk Hubbard wrote:<br/>
> Can I convert char[] to symbol?<br/>
t_symbol *gensym(const char *s);<br/>
<br/>
recommended reading:<br/>
<a href="https://github.com/pure-data/externals-howto" target="_blank">https://github.com/pure-data/externals-howto</a><br/>
<br/>
<br/>
Claude<br/>
--<br/>
<a href="https://mathr.co.uk" target="_blank">https://mathr.co.uk</a><br/>
<br/>
<br/>
<br/>
<br/>
_______________________________________________<br/>
Pd-dev mailing list<br/>
<a href="mailto:Pd-dev@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-dev@lists.iem.at'; return false;" target="_blank">Pd-dev@lists.iem.at</a><br/>
<a href="https://lists.puredata.info/listinfo/pd-dev" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a></blockquote>
</div>
</div>
_______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at <a href="https://lists.puredata.info/listinfo/pd-dev" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a></div>
</div>
</div>
</div></div></body></html>