[Csnd] UDO/parsing issue
Date | 2018-04-15 15:56 |
From | Dave Seidel |
Subject | [Csnd] UDO/parsing issue |
Hi all,
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
I use UDOs a lot, but I've just run into a case where the opcode name causes a parsing error when it is used in an instrument. Simplified it down to this:
which when compiled prints If I'm doing something wrong (always possible), it's eluding me here. - Dave |
Date | 2018-04-15 16:04 |
From | Steven Yi |
Subject | Re: [Csnd] UDO/parsing issue |
Hi Dave, I think it might be a simple typo and that you have your input and output arguments backwards: opcode_test_opcode, 0, i steven On Sun, Apr 15, 2018 at 10:56 AM, Dave Seidel |
Date | 2018-04-15 16:10 |
From | Dave Seidel |
Subject | Re: [Csnd] UDO/parsing issue |
Ahhhh! Thanks Steve, I just could not see it. I confess that I have always found this ordering confusing for some reason, but I consider it a problem in my brain, not in the software. (Though it would be nice if eventually the parser could provide a warning that was closer to the actual issue; i.e., pointing to the opcode definition instead of the invocation.) :-) - Dave On Sun, Apr 15, 2018 at 11:04 AM, Steven Yi <stevenyi@gmail.com> wrote: Hi Dave, |
Date | 2018-04-15 16:26 |
From | Steven Yi |
Subject | Re: [Csnd] UDO/parsing issue |
Agreed, the error message is not very helpful. If you would file an issue we can look at finding ways to give better error message there. Also, the new-opcode syntax in CS7 might have made that a bit clearer: opcode test_opcode(i1):void print i1 endop since you don't have to fuss with matching the inarg types with the xin statement. On Sun, Apr 15, 2018 at 11:10 AM, Dave Seidel |
Date | 2018-04-15 16:48 |
From | Dave Seidel |
Subject | Re: [Csnd] UDO/parsing issue |
Yes, I'll file a ticket. And I like the new opcode syntax much better, makes the intent and usage clearer. Thanks again. On Sun, Apr 15, 2018 at 11:26 AM, Steven Yi <stevenyi@gmail.com> wrote: Agreed, the error message is not very helpful. If you would file an |