In awk, numbers can be expressed as decimal [integer]]s or as [[floating_point?]] values.
The awk programming language does not provide facilities for specifying numbers in non [[decimal?]] bases. However numerical values in output can be formatted into [[octal?]] or [[hexadecimal?]].
Negative numbers in awk must be prefixed with a minus numbersign operator:
number = -5
It is also possible to use the plus symbol as a unary numbersign operator to prefix positive numbers. However, this form is generally not required, because numbers are positive by default:
number = +6 # 6 is positive
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.