Skip to content

Commit

Permalink
linking all logical ops
Browse files Browse the repository at this point in the history
  • Loading branch information
lichtkind committed Apr 26, 2012
1 parent 5a098ab commit 6f48f3e
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 37 deletions.
51 changes: 27 additions & 24 deletions docs/appendix-a-index.txt
Expand Up @@ -30,6 +30,8 @@ Before alpha chars (a-z) in ASCII order:
[`+ , -`](#plus) [`. / 0`](#dot) [`: ; <`](#colon)
[`= > ?`](#equal) [`@ [ \`](#at) [`^ _ {`](#caret) [`| ~`](#pipe)**



Punctuation
===========

Expand Down Expand Up @@ -182,7 +184,7 @@ and other [blocks](appendix-g-glossary.html#block)
forces [callable](tablet-3-variables#callable)
context, alias to **[code()](#code-context)**

<a id="ampersand-op"/>
<a id="ampersand-op"/><a id="junctive-and"/>
**&**
*[«junctive op»](tablet-4-operators.html#junctions)* &mdash;
*[junctive](appendix-g-glossary.html#junction)* *[AND](appendix-g-glossary.html#and)*,
Expand All @@ -193,7 +195,7 @@ requires that all conditions are met, see also: **[all](#all)**
*[«regex metachar»](appendix-b-grouped.html#regex-metacharacter)* &mdash;
match multiple patterns (*[AND](appendix-g-glossary.html#and)*-connection of patterns)

<a id="double-ampersand-metachar"/>
<a id="double-ampersand-metachar"/><a id="logical-and"/>
**&&**
*[«logical op»](tablet-4-operators.html#logical-selection)* &mdash;
short circuit *[AND](appendix-g-glossary.html#and)*,
Expand Down Expand Up @@ -287,7 +289,7 @@ forces [numeric context](appendix-g-glossary.html#numeric-context)
*[«regex metachar»](appendix-b-grouped.html#quantifier)* &mdash;
quantifier for one or more findings

<a id="plus-ampersand-op"/>
<a id="plus-ampersand-op"/><a id="numeric-and"/>
**+&**
*[«numeric op»](tablet-4-operators.html#numeric-context)* &mdash;
bitwise *[AND](appendix-g-glossary.html#and)*, forces numeric context
Expand Down Expand Up @@ -315,10 +317,10 @@ shift right in numeric context
*[«numeric op»](tablet-4-operators.html#numeric-context)* &mdash;
bitwise *[XOR](appendix-g-glossary.html#xor)* in numeric context

<a id="plus-pipe-op"/>
<a id="plus-pipe-op"/><a id="numeric-or"/>
**+|**
*[«numeric op»](tablet-4-operators.html#numeric-context)* &mdash;
bitwise *[OR](appendix-g-glossary.html#or)* in numeric context
bitwise *[OR](appendix-g-glossary.html#or)*, forces numeric context

<a id="comma"/><a id="comma-op"/>
**[,](tablet-3-variables#array)**
Expand Down Expand Up @@ -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)*

<a id="double-slash-op"/><a id="high-err"/>
<a id="double-slash-op"/><a id="defined-or"/>
**//**
*[«logical op»](tablet-4-operators.html#logical-selection)* &mdash;
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)**

<a id="backslash-0"/><a id="backslash-zero"/>
**\\0**<span class="you-provide">s</span>**\[**<span class="you-provide">n</span>**]**
Expand Down Expand Up @@ -693,7 +694,7 @@ constant compiler hint variables
matches nothing, returns always **[True](#True)**,
opposite of [**\<!\>**](#exclamation-subrule)

<a id="question-ampersand-op"/>
<a id="question-ampersand-op"/><a id="boolean-and"/>
**?&**
*[«bool op»](tablet-4-operators.html#bool-context)* &mdash;
logical *[AND](appendix-g-glossary.html#and)* op, forces binary context
Expand All @@ -717,7 +718,7 @@ that calls **[warn](#warn)**
*[«bool op»](tablet-4-operators.html#bool-context)* &mdash;
logical *[XOR](appendix-g-glossary.html#xor)*, forces operands into boolean context

<a id="question-pipe-op"/>
<a id="question-pipe-op"/><a id="boolean-or"/>
**?|**
*[«bool op»](tablet-4-operators.html#bool-context)* &mdash;
logical *[OR](appendix-g-glossary.html#or)*, forces operands into boolean context
Expand Down Expand Up @@ -857,7 +858,7 @@ match alternate patterns with longest token matching
flatten [capture](tablet-3-variables#capture)
object into arglist, (named parameter)

<a id="double-pipe-op"/>
<a id="double-pipe-op"/><a id="logical-or"/>
**||**
*[«logical op»](tablet-4-operators.html#logical-selection)* &mdash;
short circuit *[OR](appendix-g-glossary.html#or)*, evaluates sequentially,
Expand Down Expand Up @@ -891,7 +892,7 @@ forces *[string context](tablet-4-operators.html#string-context)*
[grammar](#grammar) of a sublanguage like
**[$\~MAIN](#MAIN-slang-var)**

<a id="tilde-ampersand-op"/>
<a id="tilde-ampersand-op"/><a id="string-and"/>
**\~&** *[«string op»](tablet-4-operators.html#string-context)* &mdash;
characterwise *[AND](appendix-g-glossary.html#and)*,
forces *[string context](tablet-4-operators.html#string-context)*
Expand All @@ -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)*

<a id="tilde-pipe-op"/>
<a id="tilde-pipe-op"/><a id="string-or"/>
**\~|** *[«string op»](tablet-4-operators.html#string-context)* &mdash;
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)*

<a id="doube-tilde-op"/><a id="smartmatch-op"/>
**[\~\~](tablet-4-operators.html#smartmatch)**
Expand Down Expand Up @@ -967,10 +968,10 @@ pattern will match
<a id="all"/>
**all**
*[«junctive op»](tablet-4-operators.html#junctions)* &mdash;
*[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 &mdash;
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 &mdash;
see also: [**&**](#junctive-and)

<a id="alnum-subrule"/>
**\<alnum\>**
Expand Down Expand Up @@ -1878,7 +1879,7 @@ contrast with static **[=](#triple-equal)**
**err** *[«logical op»](tablet-4-operators.html#logical-selection)* &mdash;
short circuit defined or, returns the first defined value from
the left, short circuit or,low precedence version of
**[//](#double-slash-op)**
**[//](#defined-or)**

<a id="ERR-global-var"/>
**\$\*ERR**
Expand Down Expand Up @@ -3099,7 +3100,7 @@ plural of **[ord](#ord)**, reverse of **[chrs](#chrs)**
**orelse** *«logical op»* &mdash;
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)** &mdash;
first do not succeed, similar to **[//](#defined-or)** &mdash;
example: `{...} orelse { note $! } `&mdash;
see also: **[andthen](#andthen)**

Expand Down Expand Up @@ -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) &mdash;
example: `(5 xor 0)` returns `5`
low [precedence](appendix-b-grouped.html#table-of-precedence) version of
[**\^\^**](#double-caret-op) &mdash;
example: `(5 xor 0)` returns `5` &mdash;
see also: [**or**](#or), [**err**](#err)

<a id="xx-op"/>
**xx**
Expand Down
66 changes: 53 additions & 13 deletions docs/appendix-g-glossary.txt
Expand Up @@ -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?"

<a id="nav-top"/>
**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)
Expand All @@ -20,9 +20,19 @@ questions like: "Can I do *functional programming* in Perl 6?" or
([compile time](#compile-time) or [run time](#run-time))

<a id="and"/>
**and** &mdash; 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** &mdash;
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) &mdash;
see also [*or*](#or), [*xor*](#xor), [*not*](#not)

<a id="argument"/>
**argument** &mdash; another word for *[parameter](#parameter)*
Expand Down Expand Up @@ -241,6 +251,14 @@ see also: **[multi](appendix-a-index.html#multi)**
<a id="named-parameter"/>
**named parameter** &mdash;

<a id="not"/>
**not** &mdash;
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) &mdash;
see also [*and*](#and), [*or*](#or), [*xor*](#xor)


<a id="numeric-context"/>
**numeric context** &mdash;
[Num](appendix-a-index.html#Num-type)
Expand All @@ -253,9 +271,21 @@ programming paradigm (style), that arranges data and functions
that belong together into so called objects

<a id="or"/>
**or** &mdash; 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** &mdash;
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) &mdash;
see also [*and*](#and) and [*xor*](#xor), [*not*](#not)


# [P](#nav-top)
Expand Down Expand Up @@ -314,7 +344,9 @@ address of data in memory, often termed a capture in Perl 6

<a id="regex"/>
**Regex** *(regular expression)* &mdash;
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

<a id="routine"/>
**routine** &mdash;
Expand Down Expand Up @@ -426,9 +458,17 @@ strange names that start with UTF are most probably Unicode formats

<a id="xor"/>
**xor** *(eXclusive OR)* &mdash;
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) &mdash;
other logical operations are: [*and*](#and), [*or*](#or), [*not*](#not)


# [Y](#nav-top)
Expand Down

0 comments on commit 6f48f3e

Please sign in to comment.