| I would prefer that we be able to call any function (or operator) using
opcode syntax because it is more efficient. There are times when you cannot
use --expression-opt and might prefer to write
aa add ab, ac
instead of
aa = ab + ac
If I understand correctly, all that would be needed to allow this would be
to add the 0xffff entries for all functions and operators.
By the way, it WAS possible under Csound 4 to write the following:
aa add_aa ab, ac
in the orchestra code. This would imply to me that when add_aa was changed
to add.aa that the parser should have been changed to allow periods in the
opcode name to keep "combatibility". (Yes, I realize that it was an
undocumented side effect of the way that things worked ... would be better
to just add the 0xffff entries ...)
I am not sure whether any opcode (with[out] a single argument) should be
allowed to behave as a function. I guess it really depends on whether you
think that a function should always return the same value for the same input
or whether it is OK for opcodes like readclock to be functions.
Another point that I think should be considered changed is the way that the
parser chooses between k-rate and i-rate versions of a function. The
current method of looking at the input argument's rate leads in my opinion
to some non-intuitive and even moronic situations.
For example, when using the tbN() family of functions with "vectorial
signals", I have wanted to print the values of a function table like this:
fprintks "CAstates", "%f %f %f %f \\n", \
tb0(0), tb0(1), tb0(2), tb0(3)
expecting that since the arguments to fprintks are k-rate, that I would get
the k-rate version of tb0(). Instead you get the i-rate version and have to
instead initialize a bunch of dummy k-rate variables:
k0 init 0
k1 init 1
k2 init 2
k3 init 3
fprintks "CAstates", "%f %f %f %f \\n", \
tb0(k0), tb0(k1), tb0(k2), tb0(k3)
This is really annoying when you are trying to access many more than four
table slots! I really see no value in interpreting tb0() this way, but
perhaps there are other functions or situations where this makes sense ...
??
Anthony Kozar
anthonykozar AT sbcglobal DOT net
Michael Gogins wrote on 10/12/06 9:31 AM:
> Going entirely function would break backwards compatibility, would it not?
>
> That is why I prefer having all opcodes be callable as functions and all
> functions be callable as opcodes. Then those who prefer functions, like
> myself, could go entirely functional without impeding the work of others who
> do not.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |