IMO this is a good idea. (( x=x+1 )) and (( x=$x+1 )) are identical for integers but not for floating point arithmetic, the latter form being a BANE due the rounding errors of the base conversions.
Irek 2010/3/10 ольга крыжановская <[email protected]>: > Can we get a ksh -n warning if a script uses (( $var )) in arithmetic > expressions instead of (( var )), e.h. (( var=$var+1 )) instead of the > correct (( var=var+1 )) ? > I loathe this a lot and I have to mark this manually currently in all > code reviews. > > Olga > -- > , _ _ , > { \/`o;====- Olga Kryzhanovska -====;o`\/ } > .----'-/`-/ [email protected] \-`\-'----. > `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'` > /\/\ /\/\ > `--` `--` > _______________________________________________ > ast-developers mailing list > [email protected] > https://mailman.research.att.com/mailman/listinfo/ast-developers > -- Irek _______________________________________________ ast-developers mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-developers
