On 13 January 2013 22:49, Roland Mainz <[email protected]> wrote: > Hi! > > ---- > > Does the POSIX _standard_ have anything against the idea that I can > pass an array _name_ to a function in an arithmetric expression ? > For example: > -- snip -- > float -a ar=( 1.1 2.2 3.3 ) > > float result > (( result=sumall(ar) )) > printf "result is %f\n" result > -- snip -- > ... should print: > -- snip -- > result is 6.6 > -- snip --
Passing arrays into arithmetic functions would IMO be useful for functions like fsum() (fsum() implements a more precise sum algorithm for floating point values, ref http://docs.python.org/3.1/library/math.html#math.fsum) which require to take a variable amount of values of the same type as input. Lionel _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
