You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/specs/stdlib_bitsets.md
+32-37Lines changed: 32 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ defines three bitset types, multiple constants, a character string
21
21
literal that can be read to and from strings and formatted files, a
22
22
simple character string literal that can be read to and from strings,
23
23
assignments, procedures, methods, and operators. Note that the module
24
-
assumes two's complement integers, but all current Fortran 95+
24
+
assumes two's complement integers, but all current Fortran 95 and later
25
25
processors use such integers.
26
26
27
27
Note that the module defines a number of "binary" procedures,
@@ -64,7 +64,7 @@ bits. The other constants that are error codes are summarized below:
64
64
The `stdlib_bitsets` module defines three derived types,
65
65
`bitset_type`, `bitset_64`, and `bitset_large`. `bitset_type` is an abstract
66
66
type that serves as the ancestor of `bitset_64` and
67
-
`bitset_large`. `bitset_type` defines one method, `bits`, all of its
67
+
`bitset_large`. `bitset_type` defines one method, `bits`, and all of its
68
68
other methods are deferred to its extensions. `bitset_64` is a bitset
69
69
that can handle up to 64 bits. `bitset_large` is a bitset that can handle
70
70
up `huge(0_bits_kind)` bits. All attributes of the bitset types are
@@ -238,12 +238,12 @@ are summarized in the following table:
238
238
239
239
|Operator|Description|
240
240
|--------|-----------|
241
-
|`==`, `.EQ.`|`.true.` if all bits in `set1` and `set2` have the same value, `.false.` otherwise|
242
-
|`/=`, `.NE.`|`.true.` if any bits in `set1` and `set2` differ in value, `.false.` otherwise|
243
-
|`>`, `.GT.`|`.true.` if the bits in `set1` and `set2` differ in value and the highest order differing bit is 1 in `set1` and 0 in `set2`, `.false.` otherwise|
244
-
|`>=`, `.GE.`|`.true.` if the bits in `set1` and `set2` are the same or the highest order differing bit is 1 in `set1` and 0 in `set2`, `.false.` otherwise|
245
-
|`<`, `.LT.`|`.true.` if the bits in `set1` and `set2` differ in value and the highest order differing bit is 0 in `set1` and 1 in `set2`, `.false.` otherwise|
246
-
|`<=`, `.LE.`|`.true.` if the bits in `set1` and `set2` are the same or the highest order differing bit is 0 in `set1` and 1 in `set2`, `.false.` otherwise|
241
+
|`==`, `.eq.`|`.true.` if all bits in `set1` and `set2` have the same value, `.false.` otherwise|
242
+
|`/=`, `.ne.`|`.true.` if any bits in `set1` and `set2` differ in value, `.false.` otherwise|
243
+
|`>`, `.gt.`|`.true.` if the bits in `set1` and `set2` differ in value and the highest order differing bit is 1 in `set1` and 0 in `set2`, `.false.` otherwise|
244
+
|`>=`, `.ge.`|`.true.` if the bits in `set1` and `set2` are the same or the highest order differing bit is 1 in `set1` and 0 in `set2`, `.false.` otherwise|
245
+
|`<`, `.lt.`|`.true.` if the bits in `set1` and `set2` differ in value and the highest order differing bit is 0 in `set1` and 1 in `set2`, `.false.` otherwise|
246
+
|`<=`, `.le.`|`.true.` if the bits in `set1` and `set2` are the same or the highest order differing bit is 0 in `set1` and 1 in `set2`, `.false.` otherwise|
247
247
248
248
249
249
## Specification of the `stdlib_bitsets` methods and procedures
@@ -256,7 +256,7 @@ Experimental
256
256
257
257
#### Description
258
258
259
-
Determines whether all bits are set to 1 in self.
259
+
Determines whether all bits are set to 1 in `self`.
260
260
261
261
#### Syntax
262
262
@@ -744,7 +744,7 @@ Subroutine
744
744
745
745
#### Arguments
746
746
747
-
`self`: shall be a scalar class `bitset_type` variable. It is an
747
+
`self`: shall be a scalar class `bitset_type` variable. It is an
748
748
`intent(out)` argument.
749
749
750
750
`string`: shall be a scalar default character expression. It is an
@@ -871,8 +871,8 @@ Subroutine
871
871
872
872
`unit`: shall be a scalar default integer expression. It is an
873
873
`intent(in)` argument. Its value must be that of a logical unit
874
-
number for an open unformatted file with `READ` or `READWRITE`
875
-
access positioned at the start of a BITSET value written by a
874
+
number for an open unformatted file with `read` or `readwrite`
875
+
access positioned at the start of a bitset value written by a
876
876
`bitset_type``output` subroutine by the same processor.
877
877
878
878
`status` (optional): shall be a scalar default integer variable. If
@@ -997,8 +997,8 @@ Elemental subroutine.
997
997
#### Argument
998
998
999
999
`self` shall be a scalar variable of class `bitset_type`. It is an
1000
-
`intent(inout)` argument. On return its bits shall be the logical
1001
-
complement of their values on input.
1000
+
`intent(inout)` argument. On return its bits shall be the logical
1001
+
complement of their values on input.
1002
1002
1003
1003
#### Example
1004
1004
@@ -1041,9 +1041,9 @@ Elemental subroutine.
1041
1041
#### Arguments
1042
1042
1043
1043
`set1`: shall be a scalar `bitset_64` or `bitset_large` variable. It
1044
-
is an `intent(inout)` argument. On return the values of the bits in
1045
-
`setf` are the bitwise `or` of the original bits in `set1` with the
1046
-
corresponding bits in `set2`.
1044
+
is an `intent(inout)` argument. On return the values of the bits in
1045
+
`setf` are the bitwise `or` of the original bits in `set1` with the
1046
+
corresponding bits in `set2`.
1047
1047
1048
1048
`set2`: shall be a scalar expression of the same type as `set1`. It is
1049
1049
an `intent(in)` argument. Note `bits(set2)` must equal `bits(set1)`
@@ -1097,7 +1097,7 @@ Subroutine.
1097
1097
1098
1098
`unit`: shall be a scalar default integer expression. It is an
1099
1099
`intent(in)` argument. Its value must be that of an I/O unit number
1100
-
for an open unformatted file with `WRITE` or `READWRITE` access.
1100
+
for an open unformatted file with `write` or `readwrite` access.
1101
1101
1102
1102
`status` (optional): shall be a scalar default integer variable. It is
1103
1103
an `intent(out)` argument. If present on return it will have the value
@@ -1182,7 +1182,7 @@ or a blank.
1182
1182
1183
1183
`unit` (optional): shall be a scalar default integer expression. It is
1184
1184
an `intent(in)` argument. Its value must be that of an I/O unit number
1185
-
for an open formatted file with `READ` or `READWRITE` access
1185
+
for an open formatted file with `read` or `readwrite` access
1186
1186
positioned at the start of a *bitset-literal*.
1187
1187
1188
1188
`advance` (optional): shall be a scalar default character
@@ -1394,7 +1394,7 @@ Subroutine
1394
1394
`intent(in)` argument.
1395
1395
1396
1396
`string`: shall be a scalar default character variable of allocatable
1397
-
length. It is an `intent(out)` argument. On return it shall hav a
1397
+
length. It is an `intent(out)` argument. On return it shall have a
1398
1398
*binary-literal* representation of the bitset `self`.
1399
1399
1400
1400
`status` (optional): shall be a scalar default integer variable. It is
@@ -1644,12 +1644,11 @@ Returns `.true.` if all bits in `set1` and `set2` have the same value,
0 commit comments