Re: [Csnd-dev] is this also a new-style UDO issue?
Dave Seidel <[email protected]> Fri, 26 Sep 2025 22:26:51 -0400
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <CAMnrweCQSH9qnCtJK-ME=7rsq=uGizi+eHucSAd0sOWFR-6EHQ@mail.gmail.com> |
I would only use init with a k-var, so using = seems correct to me. On Fri, Sep 26, 2025 at 9:13 PM joachim heintz <[email protected]> wrote: > it seems to be more related to the init opcode --- either not working > properly for booleans, or used in a wrong way? > this version with assignment works: > > opcode one3(arrr:k[]):(b) > ans:b = true > xout(ans) > endop > > instr 1 > a:k[] = [1,1,1] > if one3(a) then > printks("True\n",0) > else > printks("False\n",0) > endif > turnoff > endin > > > On 27/09/2025 09:51, joachim heintz wrote: > > opcode one3(arrr:k[]):(b) > > ans:b init true > > //here is of course other code > > xout(ans) > > endop > > > > instr 1 > > a:k[] = [1,1,1] > > if one3(a) then > > printks("True\n",0) > > else > > printks("False\n",0) > > endif > > turnoff > > endin > > > > it should print "True" but it prints "False". > > it works when i write > > if true then > > ... > > > > by the way: how can i print the boolean value? > > > > joachim >