arithmetic
The [[awk]] programming language provides a set of [[dyadic]] arithmetic operators for performing basic . . . integers may produce floating point results]] [[precedence]] . . .
1K - last updated 2011-05-24 22:16 UTC by markhobley
AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . [[output]] * [[parentheses]] * [[pattern]]s * [[precedence]] * [[print]] * [[printf]] * [[putline]] . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
comp.lang.awk FAQ
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . -22 }' lose the space? <include "ConcatenationPrecedence"> [[http://awk.freeshell.org/?action=edit;id=ConcatenationPrecedence| . . .
8K - last updated 2009-03-04 12:42 UTC by pgas
compound assignment operator
The *compound assignment operators* (also called *combination assignment operators*) provide a more concise . . . | [[division]] | %= | [[modulus]] === Operator precedence === Care should be taken when compound assignment . . . compound assignment operators may have a lower [[precedence]] than the other operators around them, . . .
2K - last updated 2011-03-27 09:46 UTC by markhobley
concatenation
== The awk programming language does not have an explicit concatenation operator == The awk programming . . . will output 234 BEGIN { print 2 3 4 } }}} === Precedence === Note that [[concatenation]] has a lower . . . [[precedence]] than [[addition]], so unexpected results . . .
1K - last updated 2011-06-25 05:13 UTC by pgas
ConcatenationPrecedence
You'd expect `6 -22', but you get `6-22'. It's because the `" " -22' is grouped first, as a substraction . . .
1K - last updated 2008-12-15 12:37 UTC by pgas
exponent
==Warning! The use of [[gawkism]]s will prevent the script from running correctly on systems that use . . . print (4 ** 3) # 64 (4 to the power of 3) }}} **Precedence** *The exponent operator gawkism has a higher . . . [[precedence]] than all other [[arithmetic]] operators: . . . (2 * 4 ** 3) # 128 the exponent has a higher precedence than multiplication }}} **Exponent Combination . . .
2K - last updated 2012-03-20 07:33 UTC by g0pher
field reference
== The field reference operator == The [[dollar]] symbol acts as a unary *field reference operator* and . . . [[evaluation]] of the [[expression]] takes [[precedence]] over the field reference operator: {{{ . . .
2K - last updated 2011-06-28 09:12 UTC by markhobley
logical operator
In [[awk]], *logical operators* are used to perform [[boolean]] operations, and a return a value of [true] . . . print ("apples" || "pears") # 1 (true) }}} == Precedence * [[Precedence of logical operators]] The . . . unary [[NOT]] operator has a higher [[precedence]] than the dyadic [[AND]] and [[OR]] operators: . . . and Bitwise Operators ---- [[Logical Operator Precedence]] [[Conditional Branching Using Logical . . .
3K - last updated 2009-01-02 11:13 UTC by pgas
operator
The [[awk]] programming language provides a series of *operators* that allow [[value]]s and [[variable]]s . . . a [[gawkism]] * [[repetition]] operator ---- [[precedence]] [[bracket]]s . . .
3K - last updated 2011-05-24 22:19 UTC by markhobley
precedence
The [[awk]] programming language uses rules of *precedence* to determine the order in which [[operator]]s . . . of 23, because [[multiplication]] has a higher precedence than [[addition]], so it is performed first. . . . of 35, because the [[parentheses]] have a higher precedence than [[multiplication]], so their contents . . . or functions within parentheses have the same precedence as normal_ Groups of [[operator]]s or [[function]]s . . . within parentheses have the same precedence as they normal would. In the following example, . . .
7K - last updated 2013-04-11 06:58 UTC by markhobley
SimpleCalc
Simple 4 operations calculator ... {{{ awk # usage: print calc("5 * (1 + 2) * 5 + 7") # reads and update . . . ,len, stack, head, op, s, token, pre) { # precedence table pre["+"]=pre["-"]=1 pre["*"]=pre["/"]=2 . . .
2K - last updated 2015-09-10 06:14 UTC by pgas
12 pages found.