Documentation Source Text

Check-in [153857859d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarify the behavior of the "%" operator when presented with non-integer operands.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.33
Files: files | file ages | folders
SHA3-256: 153857859d220dbdb8adf79e9a4aa6c43d7ae19fbacd748f0e425e0173ed0858
User & Date: drh 2020-08-27 13:32:46
Context
2020-08-28
15:34
Remove obsolete contract link from the consortium page. (check-in: 53d98374ae user: drh tags: branch-3.33)
2020-08-27
13:32
Clarify the behavior of the "%" operator when presented with non-integer operands. (check-in: 153857859d user: drh tags: branch-3.33)
2020-08-25
16:49
Fix the display of constructors and destructors in the object documentation. (check-in: ba732954be user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/lang_expr.in.

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
to strings, numbers, blobs or NULL and it always returns a result
with the same value as the operand.</p>"</tcl>

<p>Note that there are two variations of the equals and not equals
operators.  ^Equals can be either

<tcl>
hd_puts "[Operator =] or [Operator ==].
^The non-equals operator can be either
[Operator !=] or [Operator {&lt;&gt;}].
^The [Operator ||] operator is \"concatenate\" - it joins together
the two strings of its operands.
^The operator [Operator %] outputs the integer value of its left 
operand modulo its right operand.  In other words, the
operator [Operator %] works in SQLite the same as it does
in ANSI-C.</p>

<p>^The result of any binary operator is either a numeric value or 
NULL, except for the [Operator ||] concatenation operator which always 
evaluates to either NULL or a text value.</p>"

hd_fragment {isisnot} {IS operator} {IS NOT operator}








|




|
|
<
|







50
51
52
53
54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
to strings, numbers, blobs or NULL and it always returns a result
with the same value as the operand.</p>"</tcl>

<p>Note that there are two variations of the equals and not equals
operators.  ^Equals can be either

<tcl>
hd_resolve "[Operator =] or [Operator ==].
^The non-equals operator can be either
[Operator !=] or [Operator {&lt;&gt;}].
^The [Operator ||] operator is \"concatenate\" - it joins together
the two strings of its operands.
^The [Operator %] operator \[cast|casts\] both of its operands to type
INTEGER and then computes the remainder after dividing the left integer

by the right integer.</p>

<p>^The result of any binary operator is either a numeric value or 
NULL, except for the [Operator ||] concatenation operator which always 
evaluates to either NULL or a text value.</p>"

hd_fragment {isisnot} {IS operator} {IS NOT operator}