If-then uses ckgoto with k-condition and kval init 1 ckgoto kval == 1, cont ivar = 123 cont: print ivar result: ivar = 123.000 `cggoto' also fails `goto' works: kval init 1 goto cont ivar = 123 cont: print ivar result: ivar = 0.000 `goto' works because it's without condition, therefore I think that the problem is here (OOps/goto_ops.c) int icgoto(CSOUND *csound, CGOTO *p) { if (*p->cond) csound->ids = p->lblblk->prvi; return OK; } int kcgoto(CSOUND *csound, CGOTO *p) { if (*p->cond) csound->pds = p->lblblk->prvp; return OK; } I now understand the difficulties of relinking with if-then. When `create_goto_token' (csound_orc_expression.c) uses ckgoto, if-then fails with the irate variables. It seems a bug to fix. Returning to i() topic. Redefining "=.k" is wrong, I know it, it was a first (wrong) reaction to the if-then problem. I have wanted only to change the operations, like "add", "sub" etc. like the `goto' opcode { "goto", S(GOTO), 3, "", "l", igoto, kgoto } To add two kvars add k1 k2 doesn't change the state of `k1' or `k2'. The only sacrifice is a calculation during the init pass. I have tried add.kk in the modified version { "add.kk", S(AOP), 2, "k", "kk", addkk, addkk } and I don't see problems yet; in kfoo = k1 + k2 the value of kfoo is the value of k1 + the value of k2 to the same k-cycle. The init pass is gone (=.k is krate). It works fine with i(). Probably the idea is wrong, but I want to see my errors in the practice, so I'll make other tests with the hope to find a more convincing solution. Sorry for all this noise. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net