[Home]
HomePage RecentChanges Frequently Asked Questions

arithmetic

The awk programming language provides a set of [[dyadic?]] arithmetic operators for performing basic arithmetic on [[integer?]] and [[floating_point?]] values.

*Operator* *Description*
+ [[addition?]]
- [[subtraction?]]
 print 6 + 3 # addition
 print 8 - 3 # subtraction
 print 6 * 3 # multiplication
 print 10 / 4 # division
 print 10 % 4 # modulus

The awk programming language does not provide an exponent operator

Traditionally, the awk programming language does not provide an exponent operator.

The backslash symbol may not be used for integer division

Traditionally, the awk programming language does not support the use of a backslash symbol as an [[integer_division?]] operator.


[[Calculations_involving_integers_may_produce_floating_point_results?]]

precedence


Edit this page View other revisions Administration
Last edited 2011年05月24日 22:16 UTC by markhobley

Powered by sdf Creative Commons License <pierre.gaston+awk@gmail.com>

Awk Wiki by #awk is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

AltStyle によって変換されたページ (->オリジナル) /