Hi,
The help patch for expr included in PD vanilla 0.41 points to http://www.crca.ucsd.edu/~yadegari/expr.html where it says: """ All expr family objects support a variety of functions as follows: [...] floor() largest integral value not greater than argument (added in version 0.4) """
However, if I try to use floor() I get a syntax error. e.g. [floor($f1)]
Am I missing something?
In the PD output I can see: "expr, expr~, fexpr~ version 0.4 under GNU General Public License" (which is the version in which floor has been added according to the abovementioned doc); also, searching the archives for the words "expr" and "floor" I encountered a message datiing back to 2002 that said that floor and ceil were added.........
matteo sisti sette wrote:
Hi,
The help patch for expr included in PD vanilla 0.41 points to http://www.crca.ucsd.edu/~yadegari/expr.html where it says: """ All expr family objects support a variety of functions as follows: [...] floor() largest integral value not greater than argument (added in version 0.4) """
However, if I try to use floor() I get a syntax error. e.g. [floor($f1)]
Am I missing something?
There is a bug, floor() and ceil() are in the wrong table in the expr code (the one for 2-arg funcs not the one for 1-arg funcs), or something similar.
Try floor($f1, 0) and ceil($f1, 0) (the second argument is ignored).
Should be easy to fix, but would break all patches currently using this workaround...
In the PD output I can see: "expr, expr~, fexpr~ version 0.4 under GNU General Public License" (which is the version in which floor has been added according to the abovementioned doc); also, searching the archives for the words "expr" and "floor" I encountered a message datiing back to 2002 that said that floor and ceil were added.........
Hallo, Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:
Try floor($f1, 0) and ceil($f1, 0) (the second argument is ignored).
Should be easy to fix, but would break all patches currently using this workaround...
Wouldn't it be possible to support both versions: one and two arguments, the latter also issueing a warning?
Frank Barknecht _ ______footils.org__
matteo sisti sette wrote:
Hi,
Am I missing something?
it's a known bug[1] that expr's floor and ceil take 2 arguments (the 2nd one is then ignored).
so, you can do [floor($f1, $f1)]
i don't know why it is not being fixed...probably because it will break patches if it changes (or because the bug is unknown "upstream")
fgmaf.r IOhannes
[1] http://sourceforge.net/tracker/index.php?func=detail&aid=1464539&gro...