@@ -54,7 +54,7 @@ bits. The other constants that are error codes are summarized below:
54
54
| ` char_string_too_large_error ` | Character string was too large to be encoded in the bitset|
55
55
| ` char_string_too_small_error ` | Character string was too small to hold the expected number of bits|
56
56
| ` index_invalid_error ` | Index to a bitstring was less than zero or greater than the number of bits|
57
- | ` integer_overflow_error ` | Attempt to define an integer value bigger than ` huge(0_bits_kind ` ) |
57
+ | ` integer_overflow_error ` | Attempt to define an integer value bigger than ` huge(0_bits_kind) ` |
58
58
| ` read_failure ` | Failure on a ` read ` statement|
59
59
| ` eof_failure ` | An unexpected "End-of-File" on a ` read ` statement|
60
60
| ` write_failure ` | Failure on a ` write ` statement|
@@ -78,13 +78,13 @@ position, that, in turn, is indexed from 0 to `bits-1`. `bitset_type` is
78
78
used only as a ` class ` to define entities that can be either a ` bitset_64 ` or
79
79
a ` bitset_large ` . The syntax for using the types are:
80
80
81
- ` class([[stdlib_bitset (module):bitset_type(class )]]) :: variable `
81
+ ` class([[stdlib_bitsets (module):bitset_type(type )]]) :: variable `
82
82
83
- ` type([[stdlib_bitset (module):bitset_64(type)]]) :: variable `
83
+ ` type([[stdlib_bitsets (module):bitset_64(type)]]) :: variable `
84
84
85
85
and
86
86
87
- ` type([[stdlib_bitset (module):bitset_large(type)]]) :: variable `
87
+ ` type([[stdlib_bitsets (module):bitset_large(type)]]) :: variable `
88
88
89
89
## The * bitset-literal*
90
90
@@ -136,6 +136,7 @@ and all characters in the string must be either "0" or "1".
136
136
## Summary of the module's operations
137
137
138
138
The ` stdlib_bitsets ` module defines a number of operations:
139
+
139
140
* "unary" methods of class ` bitset_type ` ,
140
141
* "binary" procedure overloads of type ` bitset_64 ` or ` bitset_large ` ,
141
142
* assignments, and
@@ -249,7 +250,7 @@ are summarized in the following table:
249
250
250
251
## Specification of the ` stdlib_bitsets ` methods and procedures
251
252
252
- ### ` all ` - determine whether all bits are set in ` self ` .
253
+ ### ` all ` - determine whether all bits are set in ` self `
253
254
254
255
#### Status
255
256
@@ -261,7 +262,7 @@ Determines whether all bits are set to 1 in `self`.
261
262
262
263
#### Syntax
263
264
264
- ` result = self % [[bitset_type(class ):all(bound)]]() `
265
+ ` result = self % [[bitset_type(type ):all(bound)]]() `
265
266
266
267
#### Class
267
268
@@ -297,7 +298,7 @@ otherwise it is `.false.`.
297
298
end program demo_all
298
299
```
299
300
300
- #### ` and ` - bitwise ` and ` of the bits of two bitsets.
301
+ ### ` and ` - bitwise ` and ` of the bits of two bitsets
301
302
302
303
#### Status
303
304
@@ -311,7 +312,7 @@ number of bits, otherwise the result is undefined.
311
312
312
313
#### Syntax
313
314
314
- ` call [[stdlib_bitsets(module):and(interface]] (set1, set2) `
315
+ ` call [[stdlib_bitsets(module):and(interface)]] (set1, set2) `
315
316
316
317
#### Class
317
318
@@ -417,7 +418,7 @@ Determines whether any bits are set in `self`.
417
418
418
419
#### Syntax
419
420
420
- ` result = self % [[bitset_type(class ):any(bound)]]() `
421
+ ` result = self % [[bitset_type(type ):any(bound)]]() `
421
422
422
423
#### Class
423
424
@@ -465,7 +466,7 @@ Returns the number of bits that are set to one in `self`.
465
466
466
467
#### Syntax
467
468
468
- ` result = self % [[bitset_type(class ):bit_count(bound)]] () `
469
+ ` result = self % [[bitset_type(type ):bit_count(bound)]] () `
469
470
470
471
#### Class
471
472
@@ -513,7 +514,7 @@ Reports the number of bits in `self`.
513
514
514
515
#### Syntax
515
516
516
- ` result = self % [[bitset_type(class ):bits(bound)]] () `
517
+ ` result = self % [[bitset_type(type ):bits(bound)]] () `
517
518
518
519
#### Class
519
520
@@ -545,7 +546,7 @@ the number of defined bits in `self`.
545
546
end program demo_bits
546
547
```
547
548
548
- ### ` clear ` - clears a sequence of one or more bits.
549
+ ### ` clear ` - clears a sequence of one or more bits
549
550
550
551
#### Status
551
552
@@ -566,11 +567,11 @@ Note: Positions outside the range 0 to `bits(set) -1` are ignored.
566
567
567
568
#### Syntax
568
569
569
- `call self % [[ bitset_type(class ): clear (bound)]] ( pos ) '
570
+ ` call self % [[bitset_type(type ):clear(bound)]](pos) `
570
571
571
572
or
572
573
573
- ` call self % [[bitset_type(class ):clear(bound)]](start_pos, end_pos) `
574
+ ` call self % [[bitset_type(type ):clear(bound)]](start_pos, end_pos) `
574
575
575
576
#### Class
576
577
@@ -675,21 +676,24 @@ Experimental
675
676
#### Description
676
677
677
678
Flip the values of a sequence of one or more bits.
679
+
678
680
* If only ` pos ` is present flip the bit value with position ` pos ` in
681
+
679
682
` self ` .
680
683
* If ` start_pos ` and ` end_pos ` are present with ` end_pos >= start_pos `
681
684
flip the bit values with positions from ` start_pos ` to ` end_pos ` in
682
685
` self ` .
686
+
683
687
* If ` end_pos < start_pos ` then ` self ` is unmodified.
684
688
685
689
686
690
#### Syntax
687
691
688
- ` call self % [[bitset_type(class ):flip(bound)]] (pos) `
692
+ ` call self % [[bitset_type(type ):flip(bound)]] (pos) `
689
693
690
694
or
691
695
692
- ` call self % [[bitset_type(class ):flip(bound)]] (start_pos, end_pos) `
696
+ ` call self % [[bitset_type(type ):flip(bound)]] (start_pos, end_pos) `
693
697
694
698
#### Class
695
699
@@ -737,7 +741,7 @@ binary literal.
737
741
738
742
#### Syntax
739
743
740
- ` call self % [[bitset_type(class ):from_string(bound)]](string[, status]) `
744
+ ` call self % [[bitset_type(type ):from_string(bound)]](string[, status]) `
741
745
742
746
#### Class
743
747
@@ -790,7 +794,7 @@ codes:
790
794
end program demo_from_string
791
795
```
792
796
793
- ### ` init ` - ` bitset_type ` initialization routines.
797
+ ### ` init ` - ` bitset_type ` initialization routines
794
798
795
799
#### Status
796
800
@@ -802,7 +806,7 @@ Experimental
802
806
803
807
#### Syntax
804
808
805
- ` call [[stdlib_bitsets(module ):init(interface )]] (self, bits [, status]) `
809
+ ` call self % [[bitset_type(type ):init(bound )]] (bits [, status]) `
806
810
807
811
#### Class
808
812
@@ -813,7 +817,7 @@ Subroutine.
813
817
` self ` : shall be a scalar ` bitset_64 ` or ` bitset_large ` variable. It
814
818
is an ` intent(out) ` argument.
815
819
816
- ` bits ` (optional) : shall be a scalar integer expression of kind
820
+ ` bits ` : shall be a scalar integer expression of kind
817
821
` bits_kind ` . It is an ` intent(in) ` argument that if present
818
822
specifies the number of bits in ` set ` . A negative value, or a value
819
823
greater than 64 if ` self ` is of type ` bitset_64 ` , is an error.
@@ -841,7 +845,7 @@ stop code. It can have any of the following error codes:
841
845
type(bitset_large) :: set0
842
846
call set0 % init(166)
843
847
if ( set0 % bits() == 166 ) &
844
- write(*,*) ` SET0 has the proper size.'
848
+ write(*,*) ' SET0 has the proper size.'
845
849
if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.'
846
850
end program demo_init
847
851
```
@@ -859,7 +863,7 @@ file.
859
863
860
864
#### Syntax
861
865
862
- ` call self % [[bitset_type(class ):input(bound)]] (unit [, status]) `
866
+ ` call self % [[bitset_type(type ):input(bound)]] (unit [, status]) `
863
867
864
868
#### Class
865
869
@@ -940,7 +944,7 @@ Determines whether no bits are set in `self`.
940
944
941
945
#### Syntax
942
946
943
- ` result = self % [[bitset_type(class ):none(bound)]] () `
947
+ ` result = self % [[bitset_type(type ):none(bound)]] () `
944
948
945
949
#### Class
946
950
@@ -989,7 +993,7 @@ Performs the logical complement on the bits of `self`.
989
993
990
994
#### Syntax
991
995
992
- ` call self % [[bitset_type(class ):not(bound)]] () `
996
+ ` call self % [[bitset_type(type ):not(bound)]] () `
993
997
994
998
#### Class
995
999
@@ -1019,7 +1023,7 @@ complement of their values on input.
1019
1023
end program demo_not
1020
1024
```
1021
1025
1022
- ### ` or ` - Bitwise OR of the bits of two bitsets.
1026
+ ### ` or ` - Bitwise OR of the bits of two bitsets
1023
1027
1024
1028
#### Status
1025
1029
@@ -1085,7 +1089,7 @@ Writes a binary representation of a bitset to an unformatted file.
1085
1089
1086
1090
#### Syntax
1087
1091
1088
- ` call self % [[bitset_type(class ):output(bound)]] (unit[, status]) `
1092
+ ` call self % [[bitset_type(type ):output(bound)]] (unit[, status]) `
1089
1093
1090
1094
#### Class
1091
1095
@@ -1159,11 +1163,11 @@ value.
1159
1163
1160
1164
#### Syntax
1161
1165
1162
- ` call self % [[bitset_type(class ):read_bitset(bound)]](string[, status]) `
1166
+ ` call self % [[bitset_type(type ):read_bitset(bound)]](string[, status]) `
1163
1167
1164
1168
or
1165
1169
1166
- ` call self % [[bitset_type(class ):read_bitset(bound)]](unit[, advance, status]) `
1170
+ ` call self % [[bitset_type(type ):read_bitset(bound)]](unit[, advance, status]) `
1167
1171
1168
1172
1169
1173
#### Class
@@ -1258,7 +1262,7 @@ as its error code. The possible error codes are:
1258
1262
end program demo_read_bitset
1259
1263
```
1260
1264
1261
- ### ` set ` - sets a sequence of one or more bits to 1.
1265
+ ### ` set ` - sets a sequence of one or more bits to 1
1262
1266
1263
1267
#### Status
1264
1268
@@ -1282,11 +1286,11 @@ set the bits at positions from `start_pos` to `end_pos` in `self` to 1.
1282
1286
1283
1287
#### Syntax
1284
1288
1285
- ` call self % [[bitset_type(class ):set(bound)]] (POS) `
1289
+ ` call self % [[bitset_type(type ):set(bound)]] (POS) `
1286
1290
1287
1291
or
1288
1292
1289
- ` call self % [[bitset_type(class ):set(bound)]] (START_POS, END_POS) `
1293
+ ` call self % [[bitset_type(type ):set(bound)]] (START_POS, END_POS) `
1290
1294
1291
1295
#### Class
1292
1296
@@ -1334,7 +1338,7 @@ Determine whether the bit at position `pos` is set to 1 in `self`.
1334
1338
1335
1339
#### Syntax
1336
1340
1337
- ` result = self % [[bitset_type(class ):test(bound)]](pos) `
1341
+ ` result = self % [[bitset_type(type ):test(bound)]](pos) `
1338
1342
1339
1343
#### Class
1340
1344
@@ -1383,7 +1387,7 @@ Represents the value of `self` as a binary literal in `string`.
1383
1387
1384
1388
#### Syntax
1385
1389
1386
- ` call self % [[bitset_type(class ):to_string(bound)]](string[, status]) `
1390
+ ` call self % [[bitset_type(type ):to_string(bound)]](string[, status]) `
1387
1391
1388
1392
#### Class
1389
1393
@@ -1440,7 +1444,7 @@ Determines the value of the bit at position, `pos`, in `self`.
1440
1444
1441
1445
#### Syntax
1442
1446
1443
- ` result = self % [[bitset_type(class ):value(bound)]](pos) `
1447
+ ` result = self % [[bitset_type(type ):value(bound)]](pos) `
1444
1448
1445
1449
#### Class
1446
1450
@@ -1491,11 +1495,11 @@ character string or formatted file.
1491
1495
1492
1496
#### Syntax
1493
1497
1494
- ` call self % [[bitset_type(class ):write_bitset(bound)]](string[, status]) `
1498
+ ` call self % [[bitset_type(type ):write_bitset(bound)]](string[, status]) `
1495
1499
1496
1500
or
1497
1501
1498
- ` call self % [[bitset_type(class ):write_bitset(bound)]] (unit[, advance, status]) `
1502
+ ` call self % [[bitset_type(type ):write_bitset(bound)]] (unit[, advance, status]) `
1499
1503
1500
1504
#### Class
1501
1505
@@ -1649,7 +1653,7 @@ Returns `.true.` if all bits in `set1` and `set2` have the same value,
1649
1653
1650
1654
or
1651
1655
1652
- ` result = set1 [[stdlib_bitsets(module): .EQ.(interface)]] set2 `
1656
+ ` result = set1 .EQ. set2 `
1653
1657
1654
1658
#### Class
1655
1659
@@ -1708,7 +1712,7 @@ Returns `.true.` if any bits in `self` and `set2` differ in value,
1708
1712
1709
1713
or
1710
1714
1711
- ` result = set1 [[stdlib_bitsets(module): .NE.(interface)]] set2 `
1715
+ ` result = set1 .NE. set2 `
1712
1716
1713
1717
#### Class
1714
1718
@@ -1769,7 +1773,7 @@ results are undefined.
1769
1773
1770
1774
or
1771
1775
1772
- ` result = set1 [[stdlib_bitsets(module): .GE.(interface)]] set2 `
1776
+ ` result = set1 .GE. set2 `
1773
1777
1774
1778
#### Class
1775
1779
@@ -1832,7 +1836,7 @@ results are undefined.
1832
1836
1833
1837
or
1834
1838
1835
- ` result = set1 [[stdlib_bitsets(module): .GT.(interface)]] set2 `
1839
+ ` result = set1 .GT. set2 `
1836
1840
1837
1841
#### Class
1838
1842
@@ -1894,7 +1898,7 @@ results are undefined.
1894
1898
1895
1899
or
1896
1900
1897
- ` result = set1 [[stdlib_bitsets(module): .LE.(interface)]] set2 `
1901
+ ` result = set1 .LE. set2 `
1898
1902
1899
1903
#### Class
1900
1904
@@ -1957,7 +1961,7 @@ results are undefined.
1957
1961
1958
1962
or
1959
1963
1960
- `result = set1 [[ stdlib_bitsets(module): .LT.(interface) ]] set2
1964
+ `result = set1 .LT. set2
1961
1965
1962
1966
#### Class
1963
1967
0 commit comments