(gawk.info.gz) Expressions
Info Catalog
(gawk.info.gz) Printing
(gawk.info.gz) Top
(gawk.info.gz) Patterns and Actions
Expressions
***********
Expressions are the basic building blocks of `awk' patterns and
actions. An expression evaluates to a value that you can print, test,
or pass to a function. Additionally, an expression can assign a new
value to a variable or a field by using an assignment operator.
An expression can serve as a pattern or action statement on its own.
Most other kinds of statements contain one or more expressions that
specify the data on which to operate. As in other languages,
expressions in `awk' include variables, array references, constants,
and function calls, as well as combinations of these with various
operators.
Menu
* Constants String, numeric and regexp constants.
* Using Constant Regexps When and how to use a regexp constant.
* Variables Variables give names to values for later use.
* Conversion The conversion of strings to numbers and vice
versa.
* Arithmetic Ops Arithmetic operations (`+', `-',
etc.)
* Concatenation Concatenating strings.
* Assignment Ops Changing the value of a variable or a field.
* Increment Ops Incrementing the numeric value of a variable.
* Truth Values What is ``true'' and what is ``false''.
* Typing and Comparison How variables acquire types and how this
affects comparison of numbers and strings with
`<', etc.
* Boolean Ops Combining comparison expressions using boolean
operators `||' (``or''), `&&'
(``and'') and `!' (``not'').
* Conditional Exp Conditional expressions select between two
subexpressions under control of a third
subexpression.
* Function Calls A function call is an expression.
* Precedence How various operators nest.
Info Catalog
(gawk.info.gz) Printing
(gawk.info.gz) Top
(gawk.info.gz) Patterns and Actions
automatically generated byinfo2html