[PD] Converting t_symbol to type const char

Matthew Paradis mdjp100 at york.ac.uk
Mon May 20 16:43:45 CEST 2002


Hi,

I am currently trying to port a number of my jMax externals to pd. I'm
having a problem when setting up some of my network objects which take
as object arguments the host name followed by the port number. For
example [socksenddgs localhost 6537].
I need to assign this argument to a const char, however it will not
allow me to initialise the variable.
In jMax it works in the following way;

const char *host;
int port;
socksenddgs_t *this = (socksenddgs_t *)o;
this->sockfd = -1;
host = fts_symbol_name(fts_get_symbol_arg( ac, at, 1,0));
port = fts_get_int_arg( ac, at, 2, 0);

Any ideas or examples of converting string type arguments from the
object would be much appreciated

Matt

--

Matthew Paradis
University of York
Music Department
Heslington,
York,
YO10 5DD,
UK
Tel: 0044-1904-43-2435
mdjp100 at york.ac.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20020520/ab41cb57/attachment.htm>


More information about the Pd-list mailing list