Coming back to this thread after some time.
I'm trying to check whether a given argument to an external I'm writing starts with "@" or if it is actually "@sync", but can't seem to make it work. Can't really understand how t_symbol works. I'm iterating though the arguments with int argc and t_atom *argv and if there are the right number of arguments, I'm retrieving the argument that's supposed to be "@sync" with atom_gensym(argv);
I don't know how to compare that to a hard-coded string, like "@", or "@sync". I tried comparing straight to these strings, tried strcmp(), but I don't know how to do this, and couldn't find examples online.
Any hints?
On 02/26/2018 08:09 PM, Alexandros wrote:Being informed about the mailing list archive correct link, I searched for messages about this but didn't find something (it's possible I've missed something though). I'm writing an external and I want to use an @ argument (for example "@sync hard"). How does one implement this in C code?either use flext (but then you write C++) and it comes for free. or simply iterate over the arguments, looking for symbols starting with "@" (or simply search for symbols that are "@sync"), then check whether there's another argument after that and see which value it has. fgdamrs IOhannes
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list