Skip to content

Commit f0a668c

Browse files
aman-godarajvdp1
andauthored
Apply suggestions from code review
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
1 parent 948d064 commit f0a668c

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

doc/specs/stdlib_stringlist_type.md

+13-18
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
title: stringlist type
33
---
44

5-
# `stdlib_stringlist_type` module (1-D List of Strings)
5+
# `stdlib_stringlist_type` module (1-D List of strings)
66

77
[TOC]
88

99
## Introduction
1010

11-
The `stdlib_stringlist_type` module provides with 2 derived types to deal with list of strings.
12-
`stringlist_type` derived type represents a one-dimensional list of variable-length strings which is compatible with Fortran intrinsic character and `stringlist_type` derived type represents an index to access, modify the elements of a stringlist and insert strings to a stringlist.
11+
The `stdlib_stringlist_type` module provides with 2 derived types to deal with lists of strings.
12+
`stringlist_type` derived type represents a one-dimensional list of variable-length strings which is compatible with Fortran intrinsic character and `stringlist_index_type` derived type represents an index to access, modify the elements of a stringlist and insert strings to a stringlist.
1313

14-
## Derived type provided
14+
## Derived types provided
1515

1616
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
1717
### `stringlist_type` derived type
@@ -30,7 +30,7 @@ Experimental
3030
An instance of the derived type `stringlist_index_type` represents either a forward index OR a backward index.
3131
The internal representation is implementation dependent and is not visible to the user of the module.
3232
`list_head` and `list_tail` are 2 special instances of this type representing the head and the tail of a stringlist respectively.
33-
An instance is independent of the stringlist it is used with and hence, an index can be used with multiple stringlists in the same program.
33+
An instance is independent of the `stringlist_type` it is used with and hence, an index can be used with multiple stringlists in the same program.
3434

3535
#### Status
3636

@@ -60,8 +60,8 @@ Pure function.
6060

6161
#### Argument
6262

63-
- `idx`: integer.
64-
This argument is intent(in).
63+
- `idx`: Shall be of kind `integer`.
64+
This argument is `intent(in)`.
6565

6666
#### Result value
6767

@@ -96,7 +96,7 @@ end program demo_fidx_bidx
9696
```
9797

9898
<!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -->
99-
### Constructor for stringlist
99+
### Constructor for `stringlist_type`
100100

101101
#### Description
102102

@@ -106,9 +106,7 @@ With argument: Initializes a stringlist equivalent to the input array `array` i.
106106

107107
#### Syntax
108108

109-
- No arguments given: `res = [[stdlib_stringlist_type(module):stringlist_type(interface)]] ()`
110-
111-
- With argument: `res = [[stdlib_stringlist_type(module):stringlist_type(interface)]] (array)`
109+
`res = [[stdlib_stringlist_type(module):stringlist_type(interface)]] ([array])`
112110

113111
#### Status
114112

@@ -120,11 +118,8 @@ Pure function.
120118

121119
#### Argument
122120

123-
1). No arguments.
124-
125-
2). With argument:
126-
- `array`: array of Character scalar or array of [[stdlib_string_type(module):string_type(type)]].
127-
This argument is intent(in).
121+
- `array`: Shall be an array of `character` scalar or array of [[stdlib_string_type(module):string_type(type)]].
122+
This argument is `intent(in)` and `optional`.
128123

129124
#### Result value
130125

@@ -175,10 +170,10 @@ Pure subroutine.
175170
#### Argument
176171

177172
- `idx`: [[stdlib_stringlist_type(module):stringlist_index_type(type)]].
178-
This argument is intent(in).
173+
This argument is `intent(in)`.
179174

180175
- `string`: Character scalar or [[stdlib_string_type(module):string_type(type)]].
181-
This argument is intent(in).
176+
This argument is `intent(in)`.
182177

183178
#### Result value
184179

src/stdlib_stringlist_type.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
! throughout the PR
1616
!
1717
module stdlib_stringlist_type
18-
use stdlib_string_type, only: string_type, operator(/=) !, move
18+
use stdlib_string_type, only: string_type, operator(/=)
1919
use stdlib_math, only: clip
2020
implicit none
2121
private

0 commit comments

Comments
 (0)