z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Numeric values

z/OS UNIX System Services User's Guide
SA23-2279-00

A numeric value consists of digits with an optional sign and decimal point. A numeric value is not enclosed in quotes. For example:
10    0.34    –78    +2.56    –.92
are all valid in awk. awk does not let you put commas inside numbers. For example, you must write 1000 instead of 1,000.
Note: awk lets you use exponential or scientific notation. Exponents are given as e or E, followed by an optionally signed exponent. Thus:
1E3    1.0e3    10E2    1000
are all equivalent.

When awk compares numbers (with such operators as > or <), it makes comparisons in accordance with the usual rules of arithmetic.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014