Skip to content

Commit d40b91a

Browse files
committed
Misc copy-editing
1 parent 361942f commit d40b91a

File tree

2 files changed

+42
-44
lines changed

2 files changed

+42
-44
lines changed

src/docs/asciidoc/en/refdocs/fblangref60/_langref-commons.adoc

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ Formally, the syntax of a normal string literal is:
120120
----
121121

122122
* In Dialect 3, double quotes are _not valid_ for quoting strings.
123-
The SQL standard reserves double quotes for a different purpose: delimiting or quoting identifiers.
123+
The SQL standard reserves double quotes for a different purpose: delimiting or quoting <<langref-structure-identifiers,identifiers>>.
124124
* If a literal apostrophe is required within a string constant, it is "`escaped`" by prefixing it with another apostrophe.
125125
For example, `++'Mother O''Reilly''s home-made hooch'++`.
126-
Or use the alternative quote literal: `++q'{Mother O'Reilly's home-made hooch}'++`
126+
Or use the <<langref-commons-qstrings,alternative quote literal>>: `++q'{Mother O'Reilly's home-made hooch}'++`
127127
* Care should be taken with the string length if the value is to be written to a `CHAR` or `VARCHAR` column.
128128
The maximum length for a `CHAR` or `VARCHAR` literal is 32,765 bytes.
129129
130-
The character set of a string constant is assumed to be the same as the character set of its destined storage.
130+
The character set of a string literal is assumed to be the same as the character set of its destined storage.
131131

132132
.Examples
133133
[source]
@@ -286,9 +286,7 @@ For backwards compatibility, some values of 19 digits are mapped to `NUMERIC(18,
286286
===== Hexadecimal Notation for Numbers
287287

288288
Integer values can also be entered in hexadecimal notation.
289-
Numbers with 1-8 hex digits will be interpreted as type `INTEGER`;
290-
numbers with 9-16 hex digits as type `BIGINT`;
291-
numbers with 17-32 hex digits as type `INT128`.
289+
Numbers with 1-8 hex digits will be interpreted as type `INTEGER`, 9-16 hex digits as type `BIGINT`, and 17-32 hex digits as type `INT128`.
292290

293291
.Syntax
294292
[listing,subs=+quotes]
@@ -314,28 +312,28 @@ select 0xFFFFFFFFFFFFFFFF from rdb$database -- returns -1
314312
[#langref-commons-hexranges]
315313
====== Hexadecimal Value Ranges
316314

317-
* Hex numbers in the range 0 ... 7FFF FFFF are positive ``INTEGER``s with values between 0 ... 2147483647 decimal.
315+
* Hex numbers in the range `0` ... `7FFF FFFF` are positive ``INTEGER``s with values between `0` ... `2147483647` decimal.
318316
To coerce a number to `BIGINT`, prepend enough zeroes to bring the total number of hex digits to nine or above.
319317
That changes the type but not the value.
320-
* Hex numbers between 8000 0000 ... FFFF FFFF require some attention:
318+
* Hex numbers between `8000 0000` ... `FFFF FFFF` and `8000 0000 0000 0000` ... `FFFF FFFF FFFF FFFF` require some attention:
321319
+
322320
--
323321
** When written with eight hex digits, as in `0x9E44F9A8`, a value is interpreted as 32-bit `INTEGER`.
324-
Since the leftmost bit (sign bit) is set, it maps to the negative range -2147483648 ... -1 decimal.
325-
** With one or more zeroes prepended, as in `0x09E44F9A8`, a value is interpreted as 64-bit `BIGINT` in the range 0000 0000 8000 0000 ... 0000 0000 FFFF FFFF.
326-
The sign bit is not set now, so they map to the positive range 2147483648 ... 4294967295 decimal.
322+
Since the leftmost bit (sign bit) is set, it maps to the negative range `-2147483648` ... `-1` decimal.
323+
** With one or more zeroes prepended, as in `0x09E44F9A8`, a value is interpreted as 64-bit `BIGINT` in the range `0000 0000 8000 0000` ... `0000 0000 FFFF FFFF`.
324+
The sign bit is not set now, so they map to the positive range `2147483648` ... `4294967295` decimal.
327325
--
328326
+
329-
Thus, in this range, and for 16 vs 16+ digits, prepending a mathematically insignificant 0 results in a different value.
327+
Thus, for 8 vs 8+ digits, and for 16 vs 16+ digits, prepending a mathematically insignificant 0 results in a different value.
330328
This is something to be aware of.
331-
* Hex numbers between 0 0000 0001 ... 7FFF FFFF FFFF FFFF are all positive `BIGINT`.
332-
* Hex numbers between 8000 0000 0000 0000 ... FFFF FFFF FFFF FFFF are all negative `BIGINT`.
333-
* Hex numbers between 0 0000 0000 0000 0001 ... 7FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF are all positive `INT128`
334-
* Hex numbers between 8000 0000 0000 0000 0000 0000 0000 0000 ... FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF are all negative `INT128`
329+
* Hex numbers between `0 0000 0001` ... `7FFF FFFF FFFF FFFF` are all positive `BIGINT`.
330+
* Hex numbers between `8000 0000 0000 0000` ... `FFFF FFFF FFFF FFFF` are all negative `BIGINT`.
331+
* Hex numbers between `0 0000 0000 0000 0001` ... `7FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` are all positive `INT128`
332+
* Hex numbers between `8000 0000 0000 0000 0000 0000 0000 0000` ... `FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` are all negative `INT128`
335333
* A `SMALLINT` cannot be written in hex, strictly speaking, since even `0x0` and `0x1` are evaluated as `INTEGER`.
336-
However, if you write a positive integer within the 16-bit range `0x0000` (decimal zero) to `0x7FFF` (decimal 32767) it will be converted to `SMALLINT` transparently.
334+
However, if you write a positive integer within the 16-bit range `0x0000` (decimal `0`) to `0x7FFF` (decimal `32767`) it will be converted to `SMALLINT` transparently.
337335
+
338-
It is possible to write to a negative `SMALLINT` in hex, using a 4-byte hex number within the range `0xFFFF8000` (decimal -32768) to `0xFFFFFFFF` (decimal -1).
336+
It is possible to write to a negative `SMALLINT` in hex, using a 4-byte hex number within the range `0xFFFF8000` (decimal `-32768`) to `0xFFFFFFFF` (decimal `-1`).
339337
340338
[#langref-commons-boolean-literal]
341339
==== Boolean Literals
@@ -549,38 +547,38 @@ FROM EMPLOYEE
549547

550548
[#langref-dtyp-tbl-arithpreced]
551549
.Arithmetic Operator Precedence
552-
[cols="<1,<2,<1", options="header",stripes="none"]
550+
[cols="<1m,<2,<1", options="header",stripes="none"]
553551
|===
554552
^| Operator
555553
^| Purpose
556554
^| Precedence
557555

558-
|`{plus}signed_number`
556+
|{plus}signed_number
559557
|Unary plus
560558
|1
561559

562-
|`-signed_number`
560+
|-signed_number
563561
|Unary minus
564562
|1
565563

566-
|`{asterisk}`
564+
|{asterisk}
567565
|Multiplication
568566
|2
569567

570-
|`/`
568+
|/
571569
|Division
572570
|2
573571

574-
|`{plus}`
572+
|{plus}
575573
|Addition
576574
|3
577575

578-
|`-`
576+
|-
579577
|Subtraction
580578
|3
581579
|===
582580

583-
Where operators have the same precedence, they are evaluated in left-to-right sequence.
581+
Where operators have the same precedence, they are evaluated in left-to-right order.
584582

585583
.Example
586584
[source]
@@ -594,45 +592,45 @@ UPDATE T
594592

595593
[#langref-dtyp-tbl-comparpreced]
596594
.Comparison Operator Precedence
597-
[cols="<1,<2,<1", options="header",stripes="none"]
595+
[cols="<1m,<2,<1", options="header",stripes="none"]
598596
|===
599597
^| Operator
600598
^| Purpose
601599
^| Precedence
602600

603-
|`IS`
601+
|IS
604602
|Checks that the expression on the left is (not) `NULL` or the Boolean value on the right
605603
|1
606604

607-
|`=`
605+
|=
608606
|Is equal to, is identical to
609607
|2
610608

611-
|`<>`, `!=`, `~=`, `^=`
609+
|<>, !=, ~=, ^=
612610
|Is not equal to
613611
|2
614612

615-
|`>`
613+
|>
616614
|Is greater than
617615
|2
618616

619-
|`<`
617+
|<
620618
|Is less than
621619
|2
622620

623-
|`>=`
621+
|>=
624622
|Is greater than or equal to
625623
|2
626624

627-
|`++<=++`
625+
|++<=++
628626
|Is less than or equal to
629627
|2
630628

631-
|`!>`, `~>`, `^>`
629+
|!>, ~>, ^>
632630
|Is not greater than
633631
|2
634632

635-
|`!<`, `~<`, `^<`
633+
|!<, ~<, ^<
636634
|Is not less than
637635
|2
638636
|===
@@ -654,21 +652,21 @@ IF (SALARY > 1400) THEN
654652

655653
[#langref-dtyp-tbl-logical]
656654
.Logical Operator Precedence
657-
[cols="<1,<2,<1", options="header",stripes="none"]
655+
[cols="<1m,<2,<1", options="header",stripes="none"]
658656
|===
659657
^| Operator
660658
^| Purpose
661659
^| Precedence
662660

663-
|`NOT`
661+
|NOT
664662
|Negation of a search condition
665663
|1
666664

667-
|`AND`
665+
|AND
668666
|Combines two or more predicates, each of which must be true for the entire predicate to be true
669667
|2
670668

671-
|`OR`
669+
|OR
672670
|Combines two or more predicates, of which at least one predicate must be true for the entire predicate to be true
673671
|3
674672
|===
@@ -750,8 +748,8 @@ All other conditional expressions apply internal functions derived from `CASE` a
750748
The `CASE` construct returns a single value from a number of possible values.
751749
Two syntactic variants are supported:
752750

753-
* The _simple_{nbsp}``CASE``, comparable to a _case construct_ in Pascal or a _switch_ in C
754-
* The _searched_{nbsp}``CASE``, which works like a series of "```if ... else if ... else if```"{nbsp}clauses.
751+
* The <<langref-commons-conditional-case-simple,_simple_ ``CASE``>>, comparable to a _case construct_ in Pascal or a _switch_ in C
752+
* The <<langref-commons-conditional-case-srched,_searched_ ``CASE``>>, which works like a series of "```if ... else if ... else if```" clauses.
755753
756754
[#langref-commons-conditional-case-simple]
757755
===== Simple `CASE`
@@ -927,7 +925,7 @@ WHERE EXISTS
927925
AND O.adate = DATE '10.03.1990');
928926
----
929927

930-
When subqueries are used to get the values of the output column in the `SELECT` list, a subquery must return a _scalar_ result (see below).
928+
When subqueries are used to get the values of the output column in the `SELECT` list, a subquery must return a <<langref-commons-scalarsq,_scalar_ result>>.
931929

932930
[#langref-commons-scalarsq]
933931
==== Scalar Results

src/docs/asciidoc/en/refdocs/fblangref60/_langref-dochist.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The exact file history is recorded in our _git_ repository; see https://github.c
1616
a|* Copied the _Firebird 5.0 Language Reference_ as a starting point:
1717
** Renamed files and reference using _fblangref50_ to _langref_ (new naming convention)
1818
** Where applicable, replaced references to Firebird 5.0 with Firebird 6.0
19-
* ...
19+
* Documented `SCHEMA` DDL
2020

2121
|===
2222

0 commit comments

Comments
 (0)