On 15 January 2013 21:45, David Korn <[email protected]> wrote: > cc: [email protected] > Subject: Re: [ast-developers] Passing an array name to a function in an > arithmetric expression valid in POSIX ? > -------- > >> >> 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 -- >> > > The POSIX standard does not define arrays. > The POSIX standard does not define floating point arithmetic > The POSIX standard does not define ((expr)), it does define $((expr)). > The POSIX standard does not support user defined arithmetic functions. > > However, ksh93 supports user defined arithmetic functions and > I like the idea of allowing arrays to be passed as an argument. > I will add this to my wish list.
Thanks is this going to be implemented soon? Lionel _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
