[PD] numbers over 6 digits--URGENT!!
Mathieu Bouchard
matju at artengine.ca
Mon Sep 25 05:08:49 CEST 2006
On Sun, 24 Sep 2006, Frank Barknecht wrote:
> Actually this may be a bug in Pd: +1 is the same as 1 but in Pd it isn't
> (you cannot create a [float +1] object).
Yeah, in nearly every programming language, +1 is parsed as a number
literal. Except Pd. This could be called a feature or a bug, but I'd
rather have it be a float, by consistency with other systems, and have a
way to quote symbols (it's been a while that I haven't talked about
quoting...).
Personally I'd rather use strtod() to let the standard C library do the
parsing for me. This is except for the problem that it will treat INF,
INFINITY, NAN, as floats instead of symbols, but this is easy to
circumvent and waaay easier to read than a finite-state-machine written
explicitly as a long if-else-if statement chain.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list
mailing list