Subject: Re: [ast-developers] (( x=$y )) warns about efficiency but $(( x=$y )) does not --------
> Is there a reason why ksh -n triggers a warning (( x=$y )) about > efficiency but $(( x=$y )) does not? > > In the second case, the shell has to do a conversion from number to string anyway whereas in the first case no conversions are made when y is already numeric for ((x == y)). Also, the shell compiles ((...)) into reverse polish when there are no expansions during the read phase so that if used in a loop this will only happen once. Whereas, this will happen each time in loop for $((...)). David Korn [email protected] _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
