Skip to content

Commit 15c15b3

Browse files
awvwgkivan-pijvdp1
committed
Apply suggestions from review
Co-authored-by: Ivan Pribec <ivan.pribec@gmail.com> Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
1 parent 9e15dd5 commit 15c15b3

File tree

1 file changed

+46
-26
lines changed

1 file changed

+46
-26
lines changed

doc/specs/stdlib_string_type.md

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ well as operators for working with character variables and constants.
1919
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
2020
### The `string_type` derived type
2121

22-
The `string_type` is defined as a non-extenable derived type representing a
22+
The `string_type` is defined as a non-extendible derived type representing a
2323
sequence of characters. The internal representation of the character sequence
2424
is implementation dependent and not visible for the user of the module.
2525

@@ -30,7 +30,7 @@ Experimental
3030

3131
## Procedures and methods provided
3232

33-
Procedures returning `string_type` instances can usually used in elemental
33+
Procedures returning `string_type` instances can usually be used in elemental
3434
context, while procedures returning scalar character values can only be
3535
used in a pure way.
3636

@@ -62,7 +62,7 @@ None.
6262

6363
#### Result value
6464

65-
The result is an instance of `string_type`.
65+
The result is an instance of `string_type` with zero length.
6666

6767
#### Example
6868

@@ -117,7 +117,7 @@ type(string_type) :: string
117117
string = string_type("Sequence")
118118
! len(string) == 8
119119
string = string_type(" S p a c e d ")
120-
! len(string) == 9
120+
! len(string) == 13
121121
end
122122
```
123123

@@ -752,8 +752,8 @@ end
752752
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
753753
### Verify function
754754

755-
Scan a string for the absence of a set of characters. Verifies that all
756-
the characters in string belong to the set of characters in set.
755+
Scan a *string* for the absence of a *set* of characters. Verifies that all
756+
the characters in *string* belong to the set of characters in *set*.
757757

758758
#### Description
759759

@@ -812,9 +812,9 @@ end
812812

813813

814814
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
815-
### Lgt function (lexical greater)
815+
### Lgt function (lexical greater than)
816816

817-
Lexically compare the order of two character sequences being greater.
817+
Lexically compare the order of two character sequences being greater than.
818818

819819
#### Description
820820

@@ -865,9 +865,9 @@ end
865865

866866

867867
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
868-
### Llt function (lexical less)
868+
### Llt function (lexical less than)
869869

870-
Lexically compare the order of two character sequences being less.
870+
Lexically compare the order of two character sequences being less than.
871871

872872
#### Description
873873

@@ -918,9 +918,10 @@ end
918918

919919

920920
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
921-
### Lge function (lexical greater or equal)
921+
### Lge function (lexical greater than or equal)
922922

923-
Lexically compare the order of two character sequences being greater or equal.
923+
Lexically compare the order of two character sequences being greater than
924+
or equal.
924925

925926
#### Description
926927

@@ -971,9 +972,10 @@ end
971972

972973

973974
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
974-
### Lle function (lexical less or equal)
975+
### Lle function (lexical less than or equal)
975976

976-
Lexically compare the order of two character sequences being less or equal.
977+
Lexically compare the order of two character sequences being less than
978+
or equal.
977979

978980
#### Description
979981

@@ -1032,19 +1034,22 @@ Compare the order of two character sequences being greater.
10321034

10331035
The left-hand side, the right-hand side or both character sequences can
10341036
be represented by a string type.
1035-
This defines three procedures overloading the intrinsic `operator(.gt.)`.
1037+
This defines three procedures overloading the intrinsic `operator(>)`
1038+
and `operator(.gt.)`.
10361039

10371040
#### Syntax
10381041

10391042
`res = lhs > rhs`
10401043

1044+
`res = lhs .gt. rhs`
1045+
10411046
#### Status
10421047

10431048
Experimental
10441049

10451050
#### Class
10461051

1047-
Elemental function, `operator(.gt.)`.
1052+
Elemental function, `operator(>)` and `operator(.gt.)`.
10481053

10491054
#### Argument
10501055

@@ -1085,19 +1090,22 @@ Compare the order of two character sequences being less.
10851090

10861091
The left-hand side, the right-hand side or both character sequences can
10871092
be represented by a string type.
1088-
This defines three procedures overloading the intrinsic `operator(.lt.)`.
1093+
This defines three procedures overloading the intrinsic `operator(<)`
1094+
and `operator(.lt.)`.
10891095

10901096
#### Syntax
10911097

10921098
`res = lhs < rhs`
10931099

1100+
`res = lhs .lt. rhs`
1101+
10941102
#### Status
10951103

10961104
Experimental
10971105

10981106
#### Class
10991107

1100-
Elemental function, `operator(.lt.)`.
1108+
Elemental function, `operator(<)` and `operator(.lt.)`.
11011109

11021110
#### Argument
11031111

@@ -1138,19 +1146,22 @@ Compare the order of two character sequences being greater or equal.
11381146

11391147
The left-hand side, the right-hand side or both character sequences can
11401148
be represented by a string type.
1141-
This defines three procedures overloading the intrinsic `operator(.ge.)`.
1149+
This defines three procedures overloading the intrinsic `operator(>=)`
1150+
and `operator(.ge.)`.
11421151

11431152
#### Syntax
11441153

11451154
`res = lhs >= rhs`
11461155

1156+
`res = lhs .ge. rhs`
1157+
11471158
#### Status
11481159

11491160
Experimental
11501161

11511162
#### Class
11521163

1153-
Elemental function, `operator(.ge.)`.
1164+
Elemental function, `operator(>=)` and `operator(.ge.)`.
11541165

11551166
#### Argument
11561167

@@ -1191,19 +1202,22 @@ Compare the order of two character sequences being less or equal.
11911202

11921203
The left-hand side, the right-hand side or both character sequences can
11931204
be represented by a string type.
1194-
This defines three procedures overloading the intrinsic `operator(.le.)`.
1205+
This defines three procedures overloading the intrinsic `operator(<=)`
1206+
and `operator(.le.)`.
11951207

11961208
#### Syntax
11971209

11981210
`res = lhs <= rhs`
11991211

1212+
`res = lhs .le. rhs`
1213+
12001214
#### Status
12011215

12021216
Experimental
12031217

12041218
#### Class
12051219

1206-
Elemental function, `operator(.le.)`.
1220+
Elemental function, `operator(<=)` and `operator(.le.)`.
12071221

12081222
#### Argument
12091223

@@ -1244,19 +1258,22 @@ Compare two character sequences for equality.
12441258

12451259
The left-hand side, the right-hand side or both character sequences can
12461260
be represented by a string type.
1247-
This defines three procedures overloading the intrinsic `operator(.eq.)`.
1261+
This defines three procedures overloading the intrinsic `operator(==)`
1262+
and `operator(.eq.)`.
12481263

12491264
#### Syntax
12501265

12511266
`res = lhs == rhs`
12521267

1268+
`res = lhs .eq. rhs`
1269+
12531270
#### Status
12541271

12551272
Experimental
12561273

12571274
#### Class
12581275

1259-
Elemental function, `operator(.eq.)`.
1276+
Elemental function, `operator(==)` and `operator(.eq.)`.
12601277

12611278
#### Argument
12621279

@@ -1297,19 +1314,22 @@ Compare two character sequences for inequality.
12971314

12981315
The left-hand side, the right-hand side or both character sequences can
12991316
be represented by a string type.
1300-
This defines three procedures overloading the intrinsic `operator(.ne.)`.
1317+
This defines three procedures overloading the intrinsic `operator(/=)`
1318+
and `operator(.ne.)`.
13011319

13021320
#### Syntax
13031321

13041322
`res = lhs /= rhs`
13051323

1324+
`res = lhs .ne. rhs`
1325+
13061326
#### Status
13071327

13081328
Experimental
13091329

13101330
#### Class
13111331

1312-
Elemental function, `operator(.ne.)`.
1332+
Elemental function, `operator(/=)` and `operator(.ne.)`.
13131333

13141334
#### Argument
13151335

0 commit comments

Comments
 (0)