From 6f48f3e317d5bb956b5abcc1b068ede4ce749e23 Mon Sep 17 00:00:00 2001 From: Herbert Breunung Date: Fri, 27 Apr 2012 00:01:56 +0200 Subject: [PATCH] linking all logical ops --- docs/appendix-a-index.txt | 51 +++++++++++++++------------- docs/appendix-g-glossary.txt | 66 +++++++++++++++++++++++++++++------- 2 files changed, 80 insertions(+), 37 deletions(-) diff --git a/docs/appendix-a-index.txt b/docs/appendix-a-index.txt index 806ee15..bfa50a9 100644 --- a/docs/appendix-a-index.txt +++ b/docs/appendix-a-index.txt @@ -30,6 +30,8 @@ Before alpha chars (a-z) in ASCII order: [`+ , -`](#plus) [`. / 0`](#dot) [`: ; <`](#colon) [`= > ?`](#equal) [`@ [ \`](#at) [`^ _ {`](#caret) [`| ~`](#pipe)** + + Punctuation =========== @@ -182,7 +184,7 @@ and other [blocks](appendix-g-glossary.html#block) forces [callable](tablet-3-variables#callable) context, alias to **[code()](#code-context)** - + **&** *[«junctive op»](tablet-4-operators.html#junctions)* — *[junctive](appendix-g-glossary.html#junction)* *[AND](appendix-g-glossary.html#and)*, @@ -193,7 +195,7 @@ requires that all conditions are met, see also: **[all](#all)** *[«regex metachar»](appendix-b-grouped.html#regex-metacharacter)* — match multiple patterns (*[AND](appendix-g-glossary.html#and)*-connection of patterns) - + **&&** *[«logical op»](tablet-4-operators.html#logical-selection)* — short circuit *[AND](appendix-g-glossary.html#and)*, @@ -287,7 +289,7 @@ forces [numeric context](appendix-g-glossary.html#numeric-context) *[«regex metachar»](appendix-b-grouped.html#quantifier)* — quantifier for one or more findings - + **+&** *[«numeric op»](tablet-4-operators.html#numeric-context)* — bitwise *[AND](appendix-g-glossary.html#and)*, forces numeric context @@ -315,10 +317,10 @@ shift right in numeric context *[«numeric op»](tablet-4-operators.html#numeric-context)* — bitwise *[XOR](appendix-g-glossary.html#xor)* in numeric context - + **+|** *[«numeric op»](tablet-4-operators.html#numeric-context)* — -bitwise *[OR](appendix-g-glossary.html#or)* in numeric context +bitwise *[OR](appendix-g-glossary.html#or)*, forces numeric context **[,](tablet-3-variables#array)** @@ -407,13 +409,12 @@ rational number \([immutable type](appendix-b-grouped.html#immutable-types) last created match object of this *[block](appendix-g-glossary.html#block)* - + **//** *[«logical op»](tablet-4-operators.html#logical-selection)* — short circuit *defined or*, returns the first defined value -(from left to right), similar to -**[||](#double-pipe-op)**, high precedence version of -**[err](#err)** +(from left to right), similar to **[||](#double-pipe-op)**, +high precedence version of **[err](#err)** **\\0**s**\[**n**]** @@ -693,7 +694,7 @@ constant compiler hint variables matches nothing, returns always **[True](#True)**, opposite of [**\**](#exclamation-subrule) - + **?&** *[«bool op»](tablet-4-operators.html#bool-context)* — logical *[AND](appendix-g-glossary.html#and)* op, forces binary context @@ -717,7 +718,7 @@ that calls **[warn](#warn)** *[«bool op»](tablet-4-operators.html#bool-context)* — logical *[XOR](appendix-g-glossary.html#xor)*, forces operands into boolean context - + **?|** *[«bool op»](tablet-4-operators.html#bool-context)* — logical *[OR](appendix-g-glossary.html#or)*, forces operands into boolean context @@ -857,7 +858,7 @@ match alternate patterns with longest token matching flatten [capture](tablet-3-variables#capture) object into arglist, (named parameter) - + **||** *[«logical op»](tablet-4-operators.html#logical-selection)* — short circuit *[OR](appendix-g-glossary.html#or)*, evaluates sequentially, @@ -891,7 +892,7 @@ forces *[string context](tablet-4-operators.html#string-context)* [grammar](#grammar) of a sublanguage like **[$\~MAIN](#MAIN-slang-var)** - + **\~&** *[«string op»](tablet-4-operators.html#string-context)* — characterwise *[AND](appendix-g-glossary.html#and)*, forces *[string context](tablet-4-operators.html#string-context)* @@ -911,10 +912,10 @@ context](tablet-4-operators.html#string-context)* characterwise *[XOR](appendix-g-glossary.html#xor)*, forces *[string context](tablet-4-operators.html#string-context)* - + **\~|** *[«string op»](tablet-4-operators.html#string-context)* — -characterwise or, forces *[string -context](tablet-4-operators.html#string-context)* +characterwise *[OR](appendix-g-glossary.html#or)*, +forces *[string context](tablet-4-operators.html#string-context)* **[\~\~](tablet-4-operators.html#smartmatch)** @@ -967,10 +968,10 @@ pattern will match **all** *[«junctive op»](tablet-4-operators.html#junctions)* — -*[junctive](appendix-g-glossary.html#junction)* *[AND](appendix-g-glossary.html#and)* operator, -**[True](#True)** if all conditions (elements of a -following list) are fulfilled — -see also: **[&](#junctive-and)** +*[junctive](appendix-g-glossary.html#junction)* +*[AND](appendix-g-glossary.html#and)* operator, +**[True](#True)** if all conditions (elements of a following list) are fulfilled — +see also: [**&**](#junctive-and) **\** @@ -1878,7 +1879,7 @@ contrast with static **[=](#triple-equal)** **err** *[«logical op»](tablet-4-operators.html#logical-selection)* — short circuit defined or, returns the first defined value from the left, short circuit or,low precedence version of -**[//](#double-slash-op)** +**[//](#defined-or)** **\$\*ERR** @@ -3099,7 +3100,7 @@ plural of **[ord](#ord)**, reverse of **[chrs](#chrs)** **orelse** *«logical op»* — logical *[OR](appendix-g-glossary.html#or)* short circuit operator, transferring an error code from first to second block/command, if -first do not succeed, similar to **[//](#high-err)** — +first do not succeed, similar to **[//](#defined-or)** — example: `{...} orelse { note $! } `— see also: **[andthen](#andthen)** @@ -4752,8 +4753,10 @@ converted values of both operands without changing their content, in *bool context* it returns **[True](#True)** or *False* as expected, in any other context it returns the first none empty value, the second when both are empty and [**Nil**](#Nil-type) when both are not empty, -low precedence version of [**\^\^**](#double-caret-op) — -example: `(5 xor 0)` returns `5` +low [precedence](appendix-b-grouped.html#table-of-precedence) version of +[**\^\^**](#double-caret-op) — +example: `(5 xor 0)` returns `5` — +see also: [**or**](#or), [**err**](#err) **xx** diff --git a/docs/appendix-g-glossary.txt b/docs/appendix-g-glossary.txt index c3b2ffb..2d45c00 100644 --- a/docs/appendix-g-glossary.txt +++ b/docs/appendix-g-glossary.txt @@ -7,10 +7,10 @@ questions like: "Can I do *functional programming* in Perl 6?" or "What kind of *iterators* are present and how they are spelled?" -**Navigation:** [A](#a) [B](#b) [C](#c) [D](#d) [E](#e) -[F](#f) [G](#g) [H](#h) [I](#i) [J](#j) [K](#k) [L](#l) +**Navigation: [A](#a) [B](#b) [C](#c) [D](#d) [E](#e) +[F](#f) [G](#g) [H](#h) [I](#i) [J](#j) [K](#k) [L](#l) [M](#m#) [N](#n) [O](#o) [P](#p) [Q](#q) [R](#r) [S](#s) -[T](#t#) [U](#u) [V](#v) [W](#w) [X](#x) [Y](#y) [Z](#z) +[T](#t#) [U](#u) [V](#v) [W](#w) [X](#x) [Y](#y) [Z](#z)** # [A](#nav-top) @@ -20,9 +20,19 @@ questions like: "Can I do *functional programming* in Perl 6?" or ([compile time](#compile-time) or [run time](#run-time)) -**and** — logical operation that has only a true result if both operands -(incoming information) are also true, otherwise result is false, -see also [*or*](#or) and [*xor*](#xor) +**and** — +logical operation that has only the result **True** if both operands +(incoming information) are also true, otherwise result is **False** +following operator working with that logic: +[**|**](appendix-a-index.html#junctive-and), +[**||**](appendix-a-index.html#logical-and), +[**+|**](appendix-a-index.html#numeric-and), +[**?|**](appendix-a-index.html#boolean-and), +[**~|**](appendix-a-index.html#string-and), +[**all**](appendix-a-index.html#all), +[**and**](appendix-a-index.html#and) +[**andthen**](appendix-a-index.html#andthen) — +see also [*or*](#or), [*xor*](#xor), [*not*](#not) **argument** — another word for *[parameter](#parameter)* @@ -241,6 +251,14 @@ see also: **[multi](appendix-a-index.html#multi)** **named parameter** — + +**not** — +logical operation that changes a true into false and vice versa, +following operator working with that logic: +[**!()**](appendix-a-index.html#negation-op), [**not**](appendix-a-index.html#not) — +see also [*and*](#and), [*or*](#or), [*xor*](#xor) + + **numeric context** — [Num](appendix-a-index.html#Num-type) @@ -253,9 +271,21 @@ programming paradigm (style), that arranges data and functions that belong together into so called objects -**or** — logical operation that has a true result if at least one of two -operands (incoming information) is also true, otherwise result is false, -see also [*and*](#and) and [*xor*](#xor) +**or** — +logical operation that has a the result **True** if at least one of two +operands (incoming information) is also true, otherwise result is **False** +following operator working with that logic: +[**|**](appendix-a-index.html#junctive-or), +[**||**](appendix-a-index.html#logical-or), +[**//**](appendix-a-index.html#defined-or), +[**+|**](appendix-a-index.html#numeric-or), +[**?|**](appendix-a-index.html#boolean-or), +[**~|**](appendix-a-index.html#string-or), +[**any**](appendix-a-index.html#any), +[**or**](appendix-a-index.html#or) +[**orelse**](appendix-a-index.html#orelse), +[**err**](appendix-a-index.html#err) — +see also [*and*](#and) and [*xor*](#xor), [*not*](#not) # [P](#nav-top) @@ -314,7 +344,9 @@ address of data in memory, often termed a capture in Perl 6 **Regex** *(regular expression)* — -in Perl5 its a pattern matching notation, here a whole language that does the same +in Perl 5 its a pattern matching notation, +in Perl 6 a whole rearranged language that does the same, +a [whole page](tablet-9-regexes.html) is dedicated just about that subject **routine** — @@ -426,9 +458,17 @@ strange names that start with UTF are most probably Unicode formats **xor** *(eXclusive OR)* — -logical operation that has a true result if only one of two -operands (incoming information) is also true, otherwise result is false, -see also [*and*](#and) and [*or*](#or) +logical operation that has a the result **True** if only one of two +operands (incoming information) is also true, otherwise result is **False**, +following operator working with that logic: +[**\^**](appendix-a-index.html#junctive-xor), +[**\^\^**](appendix-a-index.html#logical-xor), +[**+\^**](appendix-a-index.html#numeric-xor), +[**?\^**](appendix-a-index.html#boolean-xor), +[**~\^**](appendix-a-index.html#string-xor), +[**one**](appendix-a-index.html#one), +[**xor**](appendix-a-index.html#xor) — +other logical operations are: [*and*](#and), [*or*](#or), [*not*](#not) # [Y](#nav-top)