ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_arrayStrip::getStripped Interface Reference

Generate and return the input array modified such that all instances of the input pattern are stripped from its both sides or only the side specified. More...

Detailed Description

Generate and return the input array modified such that all instances of the input pattern are stripped from its both sides or only the side specified.

Parameters
[in]array: The input contiguous vector of either
  • type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU), or
  • type logical of kind any supported by the processor (e.g., LK), or
  • type integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64), or
  • type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128), or
  • type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
or,
  • a scalar assumed-length character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
[in]pattern: The input object of the same type and kind as the input array, of rank similar to or lower than that of array, whose value is to be stripped from the specified side of the array.
iseq: The external user-specified function that takes either two input assumed-length character arguments (if the input array is also an assumed-length character) or two array-valued explicit-shape arguments of the same type and kind as the input array.
It must return a scalar of type logical of default kind LK that is .true. if all elements of the two input arguments are equivalent (e.g., equal) according to the user-defined criterion, otherwise, it is .false..
The the input array is array-valued, then the last argument to iseq is the length of the input pattern.
The following illustrates the generic interface of iseq where pattern is array-valued,
function iseq(Segment, pattern, lenPattern) result(equivalent)
use pm_kind, only: IK, LK
integer(IK) , intent(in) :: lenPattern
TYPE(KIND) , intent(in) :: Segment(lenPattern), pattern(lenPattern)
logical(LK) :: equivalent
end function
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
where TYPE(KIND) represents the type and kind of the input argument array, which can be one of the following,
character(*, SK), intent(in) :: Segment(lenPattern), pattern(lenPattern)
integer(IK) , intent(in) :: Segment(lenPattern), pattern(lenPattern)
logical(LK) , intent(in) :: Segment(lenPattern), pattern(lenPattern)
complex(CK) , intent(in) :: Segment(lenPattern), pattern(lenPattern)
real(RK) , intent(in) :: Segment(lenPattern), pattern(lenPattern)
where the kinds SKG, IKG, LKG, CKG, RK, can refer to any kind type parameter that is supported by the processor.
The following illustrates the generic interface of iseq where pattern is scalar-valued (including Fortran scalar strings),
function iseq(segment, pattern, side) result(equivalent)
use pm_kind, only: LK
TYPE(KIND) , intent(in) :: segment, pattern
logical(LK) :: equivalent
end function
where TYPE(KIND) represents the type and kind of the input argument array, which can be one of the following,
use pm_kind, only: SK, IK, LK, CK, RK
character(*, SK), intent(in) :: segment, pattern
integer(IK) , intent(in) :: segment, pattern
logical(LK) , intent(in) :: segment, pattern
complex(CK) , intent(in) :: segment, pattern
real(RK) , intent(in) :: segment, pattern
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in C-Fortran I...
Definition: pm_kind.F90:542
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
where the kinds SK, IK, LK, CK, RK, can refer to any kind type parameter that is supported by the processor.
This user-defined equivalence check is extremely useful where an equivalence test other than exact identity is needed, for example, when the array segments should match the input pattern only within a given threshold or, when the case-sensitivity in character comparisons do not matter.
In such cases, user can define a custom equivalence criterion within the user-defined external function iseq to achieve the goal.
(optional, the default equivalence operator is .eqv. if the input array is logical, otherwise ==.)
side: The input scalar constant that be any of the following:
  1. The scalar constant left or an object of type left_type, implying that only the left side of the input array should be stripped.
  2. The scalar constant right or an object of type right_type, implying that only the right side of the input array should be stripped.
  3. The scalar constant leftRight or an object of type leftRight_type, implying that both left and right sides of the input array should be stripped.
(optional, default = leftRight)
Returns
arrayStripped : The output allocatable array of the same type, kind, rank, shape, and size as the input array, containing the input array where all instances of pattern are stripped from the specified side.


Possible calling interfaces

use pm_arrayStrip, only: getStripped, left, right, leftRight
arrayStripped = getStripped(array, pattern, side = side) ! scalar strings
arrayStripped = getStripped(array(:), pattern, side = side) ! all intrinsic types
arrayStripped = getStripped(array(:), pattern(:), side = side) ! all intrinsic types
arrayStripped = getStripped(array, pattern, iseq, side = side) ! scalar strings
arrayStripped = getStripped(array(:), pattern, iseq, side = side) ! all intrinsic types
arrayStripped = getStripped(array(:), pattern(:), iseq, side = side) ! all intrinsic types
!
Generate and return the input array modified such that all instances of the input pattern are strippe...
This module contains procedures and generic interfaces for stripping a given pattern from the left an...
Warning
The procedures under this generic interface are impure when the user-specified external procedure iseq is specified as input argument.
Note that in Fortran, trailing blanks are ignored in character equivalence checks, that is, "Fortran" == "Fortran " yields .true..
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
See also
getSIL
getSIR
getStripped
setReplaced
getReplaced
setInserted
setSplit
setLoc
getLoc


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK, CK, RK
4 use pm_io, only: display_type
5 use pm_arrayStrip, only: getStripped, left, right, leftRight
6
7 implicit none
8
9 type(display_type) :: disp
10
11 disp = display_type(file = "main.out.F90")
12
13 call disp%skip()
14 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
15 call disp%show("! Strip scalar pattern from a string scalar.")
16 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
17 call disp%skip()
18
19 block
20 character(:) , allocatable :: array, pattern
21
22 call disp%skip()
23 call disp%show("array = ''")
24 array = ''
25 call disp%show("pattern = ''")
26 pattern = ''
27 call disp%show("getStripped(array, pattern)")
28 call disp%show( getStripped(array, pattern) )
29 call disp%show("getStripped(array, pattern, leftRight)")
30 call disp%show( getStripped(array, pattern, leftRight) )
31 call disp%show("getStripped(array, pattern, right)")
32 call disp%show( getStripped(array, pattern, right) )
33 call disp%show("getStripped(array, pattern, left)")
34 call disp%show( getStripped(array, pattern, left) )
35 call disp%skip()
36
37 call disp%skip()
38 call disp%show("array = 'bbaaa'")
39 array = 'bbaaa'
40 call disp%show("pattern = ''")
41 pattern = ''
42 call disp%show("getStripped(array, pattern)")
43 call disp%show( getStripped(array, pattern) )
44 call disp%show("getStripped(array, pattern, leftRight)")
45 call disp%show( getStripped(array, pattern, leftRight) )
46 call disp%show("getStripped(array, pattern, right)")
47 call disp%show( getStripped(array, pattern, right) )
48 call disp%show("getStripped(array, pattern, left)")
49 call disp%show( getStripped(array, pattern, left) )
50 call disp%skip()
51
52 call disp%skip()
53 call disp%show("array = 'bbaaa'")
54 array = 'bbaaa'
55 call disp%show("pattern = 'a'")
56 pattern = 'a'
57 call disp%show("getStripped(array, pattern)")
58 call disp%show( getStripped(array, pattern) )
59 call disp%show("getStripped(array, pattern, leftRight)")
60 call disp%show( getStripped(array, pattern, leftRight) )
61 call disp%show("getStripped(array, pattern, right)")
62 call disp%show( getStripped(array, pattern, right) )
63 call disp%show("getStripped(array, pattern, left)")
64 call disp%show( getStripped(array, pattern, left) )
65 call disp%skip()
66
67 call disp%skip()
68 call disp%show("array = 'bbaaa'")
69 array = 'bbaaa'
70 call disp%show("pattern = 'b'")
71 pattern = 'b'
72 call disp%show("getStripped(array, pattern)")
73 call disp%show( getStripped(array, pattern) )
74 call disp%show("getStripped(array, pattern, leftRight)")
75 call disp%show( getStripped(array, pattern, leftRight) )
76 call disp%show("getStripped(array, pattern, right)")
77 call disp%show( getStripped(array, pattern, right) )
78 call disp%show("getStripped(array, pattern, left)")
79 call disp%show( getStripped(array, pattern, left) )
80 call disp%skip()
81
82 call disp%skip()
83 call disp%show("array = 'bbaaa'")
84 array = 'bbaaa'
85 call disp%show("pattern = 'bbaaa '")
86 pattern = 'bbaaa '
87 call disp%show("getStripped(array, pattern)")
88 call disp%show( getStripped(array, pattern) )
89 call disp%show("getStripped(array, pattern, leftRight)")
90 call disp%show( getStripped(array, pattern, leftRight) )
91 call disp%show("getStripped(array, pattern, right)")
92 call disp%show( getStripped(array, pattern, right) )
93 call disp%show("getStripped(array, pattern, left)")
94 call disp%show( getStripped(array, pattern, left) )
95 call disp%skip()
96
97 call disp%skip()
98 call disp%show("array = 'bbAa'")
99 array = 'bbAa'
100 call disp%show("pattern = 'aa'")
101 pattern = 'aa'
102 call disp%show("getStripped(array, pattern)")
103 call disp%show( getStripped(array, pattern) )
104 call disp%show("getStripped(array, pattern, iseqScalar_SK)")
105 call disp%show( getStripped(array, pattern, iseqScalar_SK) )
106 call disp%show("getStripped(array, pattern, leftRight)")
107 call disp%show( getStripped(array, pattern, leftRight) )
108 call disp%show("getStripped(array, pattern, right)")
109 call disp%show( getStripped(array, pattern, right) )
110 call disp%show("getStripped(array, pattern, left)")
111 call disp%show( getStripped(array, pattern, left) )
112 call disp%skip()
113
114 end block
115
116 call disp%skip()
117 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
118 call disp%show("! Strip scalar pattern from a string vector.")
119 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
120 call disp%skip()
121
122 block
123 character(2), allocatable :: array(:)
124 character(:), allocatable :: pattern
125
126 call disp%skip()
127 call disp%show("array = [character(2) :: ]")
128 array = [character(2) :: ]
129 call disp%show("pattern = ''")
130 pattern = ''
131 call disp%show("getStripped(array, pattern)")
132 call disp%show( getStripped(array, pattern) )
133 call disp%show("getStripped(array, pattern, leftRight)")
134 call disp%show( getStripped(array, pattern, leftRight) )
135 call disp%show("getStripped(array, pattern, right)")
136 call disp%show( getStripped(array, pattern, right) )
137 call disp%show("getStripped(array, pattern, left)")
138 call disp%show( getStripped(array, pattern, left) )
139 call disp%skip()
140
141 call disp%skip()
142 call disp%show("array = ['bb', 'a ', 'a ']")
143 array = ['bb', 'a ', 'a ']
144 call disp%show("pattern = 'a'")
145 pattern = 'a'
146 call disp%show("getStripped(array, pattern)")
147 call disp%show( getStripped(array, pattern) )
148 call disp%show("getStripped(array, pattern, leftRight)")
149 call disp%show( getStripped(array, pattern, leftRight) )
150 call disp%show("getStripped(array, pattern, right)")
151 call disp%show( getStripped(array, pattern, right) )
152 call disp%show("getStripped(array, pattern, left)")
153 call disp%show( getStripped(array, pattern, left) )
154 call disp%skip()
155
156 call disp%skip()
157 call disp%show("array = ['a ', 'A ', 'bb']")
158 array = ['a ', 'A ', 'bb']
159 call disp%show("pattern = 'A '")
160 pattern = 'A '
161 call disp%show("getStripped(array, pattern)")
162 call disp%show( getStripped(array, pattern) )
163 call disp%show("getStripped(array, pattern, leftRight)")
164 call disp%show( getStripped(array, pattern, leftRight) )
165 call disp%show("getStripped(array, pattern, right)")
166 call disp%show( getStripped(array, pattern, right) )
167 call disp%show("getStripped(array, pattern, left)")
168 call disp%show( getStripped(array, pattern, left) )
169 call disp%show("getStripped(array, pattern, iseqScalar_SK)")
170 call disp%show( getStripped(array, pattern, iseqScalar_SK) )
171 call disp%show("getStripped(array, pattern, iseqScalar_SK, leftRight)")
172 call disp%show( getStripped(array, pattern, iseqScalar_SK, leftRight) )
173 call disp%show("getStripped(array, pattern, iseqScalar_SK, right)")
174 call disp%show( getStripped(array, pattern, iseqScalar_SK, right) )
175 call disp%show("getStripped(array, pattern, iseqScalar_SK, left)")
176 call disp%show( getStripped(array, pattern, iseqScalar_SK, left) )
177 call disp%skip()
178
179 end block
180
181 call disp%skip()
182 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
183 call disp%show("! Strip vector pattern from a string vector.")
184 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
185 call disp%skip()
186
187 block
188 character(2), allocatable :: array(:)
189 character(:), allocatable :: pattern(:)
190
191 call disp%skip()
192 call disp%show("array = [character(2) :: ]")
193 array = [character(2) :: ]
194 call disp%show("pattern = [character(1) :: ]")
195 pattern = [character(1) :: ]
196 call disp%show("getStripped(array, pattern)")
197 call disp%show( getStripped(array, pattern) )
198 call disp%show("getStripped(array, pattern, leftRight)")
199 call disp%show( getStripped(array, pattern, leftRight) )
200 call disp%show("getStripped(array, pattern, right)")
201 call disp%show( getStripped(array, pattern, right) )
202 call disp%show("getStripped(array, pattern, left)")
203 call disp%show( getStripped(array, pattern, left) )
204 call disp%skip()
205
206 call disp%skip()
207 call disp%show("array = ['bb', 'a ', 'a ']")
208 array = ['bb', 'a ', 'a ']
209 call disp%show("pattern = [character(1) :: ]")
210 pattern = [character(1) :: ]
211 call disp%show("getStripped(array, pattern)")
212 call disp%show( getStripped(array, pattern) )
213 call disp%show("getStripped(array, pattern, leftRight)")
214 call disp%show( getStripped(array, pattern, leftRight) )
215 call disp%show("getStripped(array, pattern, right)")
216 call disp%show( getStripped(array, pattern, right) )
217 call disp%show("getStripped(array, pattern, left)")
218 call disp%show( getStripped(array, pattern, left) )
219 call disp%skip()
220
221 call disp%skip()
222 call disp%show("array = ['bb', 'a ', 'a ']")
223 array = ['bb', 'a ', 'a ']
224 call disp%show("pattern = ['a', 'a']")
225 pattern = ['a', 'a']
226 call disp%show("getStripped(array, pattern)")
227 call disp%show( getStripped(array, pattern) )
228 call disp%show("getStripped(array, pattern, leftRight)")
229 call disp%show( getStripped(array, pattern, leftRight) )
230 call disp%show("getStripped(array, pattern, right)")
231 call disp%show( getStripped(array, pattern, right) )
232 call disp%show("getStripped(array, pattern, left)")
233 call disp%show( getStripped(array, pattern, left) )
234 call disp%skip()
235
236 call disp%skip()
237 call disp%show("array = ['bb', 'a ', 'a ']")
238 array = ['bb', 'a ', 'a ']
239 call disp%show("pattern = 'bbb'")
240 pattern = 'bbb'
241 call disp%show("getStripped(array, pattern)")
242 call disp%show( getStripped(array, pattern) )
243 call disp%show("getStripped(array, pattern, leftRight)")
244 call disp%show( getStripped(array, pattern, leftRight) )
245 call disp%show("getStripped(array, pattern, right)")
246 call disp%show( getStripped(array, pattern, right) )
247 call disp%show("getStripped(array, pattern, left)")
248 call disp%show( getStripped(array, pattern, left) )
249 call disp%skip()
250
251 call disp%skip()
252 call disp%show("array = ['bb', 'a ', 'a ']")
253 array = ['bb', 'a ', 'a ']
254 call disp%show("pattern = [array, ' ']")
255 pattern = [array, ' ']
256 call disp%show("getStripped(array, pattern)")
257 call disp%show( getStripped(array, pattern) )
258 call disp%show("getStripped(array, pattern, leftRight)")
259 call disp%show( getStripped(array, pattern, leftRight) )
260 call disp%show("getStripped(array, pattern, right)")
261 call disp%show( getStripped(array, pattern, right) )
262 call disp%show("getStripped(array, pattern, left)")
263 call disp%show( getStripped(array, pattern, left) )
264 call disp%skip()
265
266 call disp%skip()
267 call disp%show("array = ['bb', 'a ', 'A ']")
268 array = ['bb', 'a ', 'A ']
269 call disp%show("pattern = ['A ', 'a ']")
270 pattern = ['A ', 'a ']
271 call disp%show("getStripped(array, pattern)")
272 call disp%show( getStripped(array, pattern) )
273 call disp%show("getStripped(array, pattern, leftRight)")
274 call disp%show( getStripped(array, pattern, leftRight) )
275 call disp%show("getStripped(array, pattern, right)")
276 call disp%show( getStripped(array, pattern, right) )
277 call disp%show("getStripped(array, pattern, left)")
278 call disp%show( getStripped(array, pattern, left) )
279 call disp%show("getStripped(array, pattern, iseqVector_SK)")
280 call disp%show( getStripped(array, pattern, iseqVector_SK) )
281 call disp%show("getStripped(array, pattern, iseqVector_SK, leftRight)")
282 call disp%show( getStripped(array, pattern, iseqVector_SK, leftRight) )
283 call disp%show("getStripped(array, pattern, iseqVector_SK, right)")
284 call disp%show( getStripped(array, pattern, iseqVector_SK, right) )
285 call disp%show("getStripped(array, pattern, iseqVector_SK, left)")
286 call disp%show( getStripped(array, pattern, iseqVector_SK, left) )
287 call disp%skip()
288
289 end block
290
291 call disp%skip()
292 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
293 call disp%show("! Strip scalar pattern an integer array.")
294 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
295 call disp%skip()
296
297 block
298 integer, allocatable :: array(:)
299 integer, allocatable :: pattern
300
301 call disp%skip()
302 call disp%show("array = [2, 1, 1]")
303 array = [2, 1, 1]
304 call disp%show("pattern = 1")
305 pattern = 1
306 call disp%show("getStripped(array, pattern)")
307 call disp%show( getStripped(array, pattern) )
308 call disp%show("getStripped(array, pattern, leftRight)")
309 call disp%show( getStripped(array, pattern, leftRight) )
310 call disp%show("getStripped(array, pattern, right)")
311 call disp%show( getStripped(array, pattern, right) )
312 call disp%show("getStripped(array, pattern, left)")
313 call disp%show( getStripped(array, pattern, left) )
314 call disp%skip()
315
316 call disp%skip()
317 call disp%show("array = [2, -1, 1]")
318 array = [2, -1, 1]
319 call disp%show("pattern = 1")
320 pattern = 1
321 call disp%show("getStripped(array, pattern)")
322 call disp%show( getStripped(array, pattern) )
323 call disp%show("getStripped(array, pattern, leftRight)")
324 call disp%show( getStripped(array, pattern, leftRight) )
325 call disp%show("getStripped(array, pattern, right)")
326 call disp%show( getStripped(array, pattern, right) )
327 call disp%show("getStripped(array, pattern, left)")
328 call disp%show( getStripped(array, pattern, left) )
329 call disp%show("getStripped(array, pattern, iseqScalar_IK)")
330 call disp%show( getStripped(array, pattern, iseqScalar_IK) )
331 call disp%show("getStripped(array, pattern, iseqScalar_IK, leftRight)")
332 call disp%show( getStripped(array, pattern, iseqScalar_IK, leftRight) )
333 call disp%show("getStripped(array, pattern, iseqScalar_IK, right)")
334 call disp%show( getStripped(array, pattern, iseqScalar_IK, right) )
335 call disp%show("getStripped(array, pattern, iseqScalar_IK, left)")
336 call disp%show( getStripped(array, pattern, iseqScalar_IK, left) )
337 call disp%skip()
338
339 end block
340
341 call disp%skip()
342 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
343 call disp%show("! Strip vector pattern an integer array.")
344 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
345 call disp%skip()
346
347 block
348 integer, allocatable :: array(:)
349 integer, allocatable :: pattern(:)
350
351 call disp%skip()
352 call disp%show("array = [integer :: ]")
353 array = [integer :: ]
354 call disp%show("pattern = [integer :: ]")
355 pattern = [integer :: ]
356 call disp%show("getStripped(array, pattern)")
357 call disp%show( getStripped(array, pattern) )
358 call disp%show("getStripped(array, pattern, leftRight)")
359 call disp%show( getStripped(array, pattern, leftRight) )
360 call disp%show("getStripped(array, pattern, right)")
361 call disp%show( getStripped(array, pattern, right) )
362 call disp%show("getStripped(array, pattern, left)")
363 call disp%show( getStripped(array, pattern, left) )
364 call disp%skip()
365
366 call disp%skip()
367 call disp%show("array = [2, 1, 1]")
368 array = [2, 1, 1]
369 call disp%show("pattern = [integer :: ]")
370 pattern = [integer :: ]
371 call disp%show("getStripped(array, pattern)")
372 call disp%show( getStripped(array, pattern) )
373 call disp%show("getStripped(array, pattern, leftRight)")
374 call disp%show( getStripped(array, pattern, leftRight) )
375 call disp%show("getStripped(array, pattern, right)")
376 call disp%show( getStripped(array, pattern, right) )
377 call disp%show("getStripped(array, pattern, left)")
378 call disp%show( getStripped(array, pattern, left) )
379 call disp%skip()
380
381 call disp%skip()
382 call disp%show("array = [2, 1, 1]")
383 array = [2, 1, 1]
384 call disp%show("pattern = [1, 1]")
385 pattern = [1, 1]
386 call disp%show("getStripped(array, pattern)")
387 call disp%show( getStripped(array, pattern) )
388 call disp%show("getStripped(array, pattern, leftRight)")
389 call disp%show( getStripped(array, pattern, leftRight) )
390 call disp%show("getStripped(array, pattern, right)")
391 call disp%show( getStripped(array, pattern, right) )
392 call disp%show("getStripped(array, pattern, left)")
393 call disp%show( getStripped(array, pattern, left) )
394 call disp%skip()
395
396 call disp%skip()
397 call disp%show("array = [2, 1, 1]")
398 array = [2, 1, 1]
399 call disp%show("pattern = 3")
400 pattern = 3
401 call disp%show("getStripped(array, pattern)")
402 call disp%show( getStripped(array, pattern) )
403 call disp%show("getStripped(array, pattern, leftRight)")
404 call disp%show( getStripped(array, pattern, leftRight) )
405 call disp%show("getStripped(array, pattern, right)")
406 call disp%show( getStripped(array, pattern, right) )
407 call disp%show("getStripped(array, pattern, left)")
408 call disp%show( getStripped(array, pattern, left) )
409 call disp%skip()
410
411 call disp%skip()
412 call disp%show("array = [2, 1, 1]")
413 array = [2, 1, 1]
414 call disp%show("pattern = array")
415 pattern = array
416 call disp%show("getStripped(array, pattern)")
417 call disp%show( getStripped(array, pattern) )
418 call disp%show("getStripped(array, pattern, leftRight)")
419 call disp%show( getStripped(array, pattern, leftRight) )
420 call disp%show("getStripped(array, pattern, right)")
421 call disp%show( getStripped(array, pattern, right) )
422 call disp%show("getStripped(array, pattern, left)")
423 call disp%show( getStripped(array, pattern, left) )
424 call disp%skip()
425
426 call disp%skip()
427 call disp%show("array = [2, 1, 1]")
428 array = [2, 1, 1]
429 call disp%show("pattern = [array, 0]")
430 pattern = [array, 0]
431 call disp%show("getStripped(array, pattern)")
432 call disp%show( getStripped(array, pattern) )
433 call disp%show("getStripped(array, pattern, leftRight)")
434 call disp%show( getStripped(array, pattern, leftRight) )
435 call disp%show("getStripped(array, pattern, right)")
436 call disp%show( getStripped(array, pattern, right) )
437 call disp%show("getStripped(array, pattern, left)")
438 call disp%show( getStripped(array, pattern, left) )
439 call disp%skip()
440
441 call disp%skip()
442 call disp%show("array = [2, -1, 1]")
443 array = [2, -1, 1]
444 call disp%show("pattern = [+1, -1]")
445 pattern = [+1, -1]
446 call disp%show("getStripped(array, pattern)")
447 call disp%show( getStripped(array, pattern) )
448 call disp%show("getStripped(array, pattern, iseqVector_IK)")
449 call disp%show( getStripped(array, pattern, iseqVector_IK) )
450 call disp%show("getStripped(array, pattern, iseqVector_IK, leftRight)")
451 call disp%show( getStripped(array, pattern, iseqVector_IK, leftRight) )
452 call disp%show("getStripped(array, pattern, iseqVector_IK, right)")
453 call disp%show( getStripped(array, pattern, iseqVector_IK, right) )
454 call disp%show("getStripped(array, pattern, iseqVector_IK, left)")
455 call disp%show( getStripped(array, pattern, iseqVector_IK, left) )
456 call disp%skip()
457
458 end block
459
460 call disp%skip()
461 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
462 call disp%show("! Strip scalar pattern from a logical array.")
463 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
464 call disp%skip()
465
466 block
467 logical, allocatable :: array(:)
468 logical, allocatable :: pattern
469 logical, allocatable :: arrayPattern(:)
470
471 call disp%skip()
472 call disp%show("array = [.true., .false., .false.]")
473 array = [.true., .false., .false.]
474 call disp%show("pattern = .false.")
475 pattern = .false.
476 call disp%show("getStripped(array, pattern)")
477 call disp%show( getStripped(array, pattern) )
478 call disp%show("getStripped(array, pattern, leftRight)")
479 call disp%show( getStripped(array, pattern, leftRight) )
480 call disp%show("getStripped(array, pattern, right)")
481 call disp%show( getStripped(array, pattern, right) )
482 call disp%show("getStripped(array, pattern, left)")
483 call disp%show( getStripped(array, pattern, left) )
484 call disp%skip()
485
486 call disp%skip()
487 call disp%show("array = [.false., .true., .true.]")
488 array = [.false., .true., .true.]
489 call disp%show("pattern = .false.")
490 pattern = .false.
491 call disp%show("getStripped(array, pattern)")
492 call disp%show( getStripped(array, pattern) )
493 call disp%show("getStripped(array, pattern, leftRight)")
494 call disp%show( getStripped(array, pattern, leftRight) )
495 call disp%show("getStripped(array, pattern, right)")
496 call disp%show( getStripped(array, pattern, right) )
497 call disp%show("getStripped(array, pattern, left)")
498 call disp%show( getStripped(array, pattern, left) )
499 call disp%show("getStripped(array, pattern, iseqScalar_LK)")
500 call disp%show( getStripped(array, pattern, iseqScalar_LK) )
501 call disp%show("getStripped(array, pattern, iseqScalar_LK, leftRight)")
502 call disp%show( getStripped(array, pattern, iseqScalar_LK, leftRight) )
503 call disp%show("getStripped(array, pattern, iseqScalar_LK, right)")
504 call disp%show( getStripped(array, pattern, iseqScalar_LK, right) )
505 call disp%show("getStripped(array, pattern, iseqScalar_LK, left)")
506 call disp%show( getStripped(array, pattern, iseqScalar_LK, left) )
507 call disp%skip()
508
509 end block
510
511 call disp%skip()
512 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
513 call disp%show("! Strip vector pattern from a logical array.")
514 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
515 call disp%skip()
516
517 block
518 logical, allocatable :: array(:)
519 logical, allocatable :: pattern(:)
520
521 call disp%skip()
522 call disp%show("array = [logical :: ]")
523 array = [logical :: ]
524 call disp%show("pattern = [logical :: ]")
525 pattern = [logical :: ]
526 call disp%show("getStripped(array, pattern)")
527 call disp%show( getStripped(array, pattern) )
528 call disp%show("getStripped(array, pattern, leftRight)")
529 call disp%show( getStripped(array, pattern, leftRight) )
530 call disp%show("getStripped(array, pattern, right)")
531 call disp%show( getStripped(array, pattern, right) )
532 call disp%show("getStripped(array, pattern, left)")
533 call disp%show( getStripped(array, pattern, left) )
534 call disp%skip()
535
536 call disp%skip()
537 call disp%show("array = [.true., .false., .false.]")
538 array = [.true., .false., .false.]
539 call disp%show("pattern = [logical :: ]")
540 pattern = [logical :: ]
541 call disp%show("getStripped(array, pattern)")
542 call disp%show( getStripped(array, pattern) )
543 call disp%show("getStripped(array, pattern, leftRight)")
544 call disp%show( getStripped(array, pattern, leftRight) )
545 call disp%show("getStripped(array, pattern, right)")
546 call disp%show( getStripped(array, pattern, right) )
547 call disp%show("getStripped(array, pattern, left)")
548 call disp%show( getStripped(array, pattern, left) )
549 call disp%skip()
550
551 call disp%skip()
552 call disp%show("array = [.true., .false., .false.]")
553 array = [.true., .false., .false.]
554 call disp%show("pattern = [.false., .false.]")
555 pattern = [.false., .false.]
556 call disp%show("getStripped(array, pattern)")
557 call disp%show( getStripped(array, pattern) )
558 call disp%show("getStripped(array, pattern, leftRight)")
559 call disp%show( getStripped(array, pattern, leftRight) )
560 call disp%show("getStripped(array, pattern, right)")
561 call disp%show( getStripped(array, pattern, right) )
562 call disp%show("getStripped(array, pattern, left)")
563 call disp%show( getStripped(array, pattern, left) )
564 call disp%skip()
565
566 call disp%skip()
567 call disp%show("array = [.true., .false., .false.]")
568 array = [.true., .false., .false.]
569 call disp%show("pattern = [.true., .true.]")
570 pattern = [.true., .true.]
571 call disp%show("getStripped(array, pattern)")
572 call disp%show( getStripped(array, pattern) )
573 call disp%show("getStripped(array, pattern, leftRight)")
574 call disp%show( getStripped(array, pattern, leftRight) )
575 call disp%show("getStripped(array, pattern, right)")
576 call disp%show( getStripped(array, pattern, right) )
577 call disp%show("getStripped(array, pattern, left)")
578 call disp%show( getStripped(array, pattern, left) )
579 call disp%skip()
580
581 call disp%skip()
582 call disp%show("array = [.true., .false., .false.]")
583 array = [.true., .false., .false.]
584 call disp%show("pattern = array")
585 pattern = array
586 call disp%show("getStripped(array, pattern)")
587 call disp%show( getStripped(array, pattern) )
588 call disp%show("getStripped(array, pattern, leftRight)")
589 call disp%show( getStripped(array, pattern, leftRight) )
590 call disp%show("getStripped(array, pattern, right)")
591 call disp%show( getStripped(array, pattern, right) )
592 call disp%show("getStripped(array, pattern, left)")
593 call disp%show( getStripped(array, pattern, left) )
594 call disp%skip()
595
596 call disp%skip()
597 call disp%show("array = [.true., .false., .false.]")
598 array = [.true., .false., .false.]
599 call disp%show("pattern = [array, .false.]")
600 pattern = [array, .false.]
601 call disp%show("getStripped(array, pattern)")
602 call disp%show( getStripped(array, pattern) )
603 call disp%show("getStripped(array, pattern, leftRight)")
604 call disp%show( getStripped(array, pattern, leftRight) )
605 call disp%show("getStripped(array, pattern, right)")
606 call disp%show( getStripped(array, pattern, right) )
607 call disp%show("getStripped(array, pattern, left)")
608 call disp%show( getStripped(array, pattern, left) )
609 call disp%skip()
610
611 call disp%skip()
612 call disp%show("array = [.true., .true., .false.]")
613 array = [.true., .true., .false.]
614 call disp%show("pattern = [.false., .true.]")
615 pattern = [.false., .true.]
616 call disp%show("getStripped(array, pattern)")
617 call disp%show( getStripped(array, pattern) )
618 call disp%show("getStripped(array, pattern, leftRight)")
619 call disp%show( getStripped(array, pattern, leftRight) )
620 call disp%show("getStripped(array, pattern, right)")
621 call disp%show( getStripped(array, pattern, right) )
622 call disp%show("getStripped(array, pattern, left)")
623 call disp%show( getStripped(array, pattern, left) )
624 call disp%show("getStripped(array, pattern, iseqVector_LK)")
625 call disp%show( getStripped(array, pattern, iseqVector_LK) )
626 call disp%show("getStripped(array, pattern, iseqVector_LK, leftRight)")
627 call disp%show( getStripped(array, pattern, iseqVector_LK, leftRight) )
628 call disp%show("getStripped(array, pattern, iseqVector_LK, right)")
629 call disp%show( getStripped(array, pattern, iseqVector_LK, right) )
630 call disp%show("getStripped(array, pattern, iseqVector_LK, left)")
631 call disp%show( getStripped(array, pattern, iseqVector_LK, left) )
632 call disp%skip()
633
634 end block
635
636 call disp%skip()
637 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
638 call disp%show("! Strip scalar pattern from a complex array.")
639 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
640 call disp%skip()
641
642 block
643 complex, allocatable :: array(:)
644 complex, allocatable :: pattern
645
646 call disp%skip()
647 call disp%show("array = [2, 1, 1]")
648 array = [2, 1, 1]
649 call disp%show("pattern = 1")
650 pattern = 1
651 call disp%show("getStripped(array, pattern)")
652 call disp%show( getStripped(array, pattern) )
653 call disp%show("getStripped(array, pattern, leftRight)")
654 call disp%show( getStripped(array, pattern, leftRight) )
655 call disp%show("getStripped(array, pattern, right)")
656 call disp%show( getStripped(array, pattern, right) )
657 call disp%show("getStripped(array, pattern, left)")
658 call disp%show( getStripped(array, pattern, left) )
659 call disp%skip()
660
661 call disp%skip()
662 call disp%show("array = [2, -1, 1]")
663 array = [2, -1, 1]
664 call disp%show("pattern = 1")
665 pattern = 1
666 call disp%show("getStripped(array, pattern)")
667 call disp%show( getStripped(array, pattern) )
668 call disp%show("getStripped(array, pattern, leftRight)")
669 call disp%show( getStripped(array, pattern, leftRight) )
670 call disp%show("getStripped(array, pattern, right)")
671 call disp%show( getStripped(array, pattern, right) )
672 call disp%show("getStripped(array, pattern, left)")
673 call disp%show( getStripped(array, pattern, left) )
674 call disp%show("getStripped(array, pattern, iseqScalar_CK)")
675 call disp%show( getStripped(array, pattern, iseqScalar_CK) )
676 call disp%show("getStripped(array, pattern, iseqScalar_CK, leftRight)")
677 call disp%show( getStripped(array, pattern, iseqScalar_CK, leftRight) )
678 call disp%show("getStripped(array, pattern, iseqScalar_CK, right)")
679 call disp%show( getStripped(array, pattern, iseqScalar_CK, right) )
680 call disp%show("getStripped(array, pattern, iseqScalar_CK, left)")
681 call disp%show( getStripped(array, pattern, iseqScalar_CK, left) )
682 call disp%skip()
683
684 end block
685
686 call disp%skip()
687 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
688 call disp%show("! Strip vector pattern from a complex array.")
689 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
690 call disp%skip()
691
692 block
693 complex, allocatable :: array(:)
694 complex, allocatable :: pattern(:)
695
696 call disp%skip()
697 call disp%show("array = [complex :: ]")
698 array = [complex :: ]
699 call disp%show("pattern = [complex :: ]")
700 pattern = [complex :: ]
701 call disp%show("getStripped(array, pattern)")
702 call disp%show( getStripped(array, pattern) )
703 call disp%show("getStripped(array, pattern, leftRight)")
704 call disp%show( getStripped(array, pattern, leftRight) )
705 call disp%show("getStripped(array, pattern, right)")
706 call disp%show( getStripped(array, pattern, right) )
707 call disp%show("getStripped(array, pattern, left)")
708 call disp%show( getStripped(array, pattern, left) )
709 call disp%skip()
710
711 call disp%skip()
712 call disp%show("array = [2, 1, 1]")
713 array = [2, 1, 1]
714 call disp%show("pattern = [complex :: ]")
715 pattern = [complex :: ]
716 call disp%show("getStripped(array, pattern)")
717 call disp%show( getStripped(array, pattern) )
718 call disp%show("getStripped(array, pattern, leftRight)")
719 call disp%show( getStripped(array, pattern, leftRight) )
720 call disp%show("getStripped(array, pattern, right)")
721 call disp%show( getStripped(array, pattern, right) )
722 call disp%show("getStripped(array, pattern, left)")
723 call disp%show( getStripped(array, pattern, left) )
724 call disp%skip()
725
726 call disp%skip()
727 call disp%show("array = [2, 1, 1]")
728 array = [2, 1, 1]
729 call disp%show("pattern = [1, 1]")
730 pattern = [1, 1]
731 call disp%show("getStripped(array, pattern)")
732 call disp%show( getStripped(array, pattern) )
733 call disp%show("getStripped(array, pattern, leftRight)")
734 call disp%show( getStripped(array, pattern, leftRight) )
735 call disp%show("getStripped(array, pattern, right)")
736 call disp%show( getStripped(array, pattern, right) )
737 call disp%show("getStripped(array, pattern, left)")
738 call disp%show( getStripped(array, pattern, left) )
739 call disp%skip()
740
741 call disp%skip()
742 call disp%show("array = [2, 1, 1]")
743 array = [2, 1, 1]
744 call disp%show("pattern = 3")
745 pattern = 3
746 call disp%show("getStripped(array, pattern)")
747 call disp%show( getStripped(array, pattern) )
748 call disp%show("getStripped(array, pattern, leftRight)")
749 call disp%show( getStripped(array, pattern, leftRight) )
750 call disp%show("getStripped(array, pattern, right)")
751 call disp%show( getStripped(array, pattern, right) )
752 call disp%show("getStripped(array, pattern, left)")
753 call disp%show( getStripped(array, pattern, left) )
754 call disp%skip()
755
756 call disp%skip()
757 call disp%show("array = [2, 1, 1]")
758 array = [2, 1, 1]
759 call disp%show("pattern = array")
760 pattern = array
761 call disp%show("getStripped(array, pattern)")
762 call disp%show( getStripped(array, pattern) )
763 call disp%show("getStripped(array, pattern, leftRight)")
764 call disp%show( getStripped(array, pattern, leftRight) )
765 call disp%show("getStripped(array, pattern, right)")
766 call disp%show( getStripped(array, pattern, right) )
767 call disp%show("getStripped(array, pattern, left)")
768 call disp%show( getStripped(array, pattern, left) )
769 call disp%skip()
770
771 call disp%skip()
772 call disp%show("array = [2, 1, 1]")
773 array = [2, 1, 1]
774 call disp%show("pattern = [array, cmplx(0)]")
775 pattern = [array, cmplx(0)]
776 call disp%show("getStripped(array, pattern)")
777 call disp%show( getStripped(array, pattern) )
778 call disp%show("getStripped(array, pattern, leftRight)")
779 call disp%show( getStripped(array, pattern, leftRight) )
780 call disp%show("getStripped(array, pattern, right)")
781 call disp%show( getStripped(array, pattern, right) )
782 call disp%show("getStripped(array, pattern, left)")
783 call disp%show( getStripped(array, pattern, left) )
784 call disp%skip()
785
786 call disp%skip()
787 call disp%show("array = [2, -1, 1]")
788 array = [2, -1, 1]
789 call disp%show("pattern = [+1, -1]")
790 pattern = [+1, -1]
791 call disp%show("getStripped(array, pattern)")
792 call disp%show( getStripped(array, pattern) )
793 call disp%show("getStripped(array, pattern, leftRight)")
794 call disp%show( getStripped(array, pattern, leftRight) )
795 call disp%show("getStripped(array, pattern, right)")
796 call disp%show( getStripped(array, pattern, right) )
797 call disp%show("getStripped(array, pattern, left)")
798 call disp%show( getStripped(array, pattern, left) )
799 call disp%show("getStripped(array, pattern, iseqVector_CK)")
800 call disp%show( getStripped(array, pattern, iseqVector_CK) )
801 call disp%show("getStripped(array, pattern, iseqVector_CK, leftRight)")
802 call disp%show( getStripped(array, pattern, iseqVector_CK, leftRight) )
803 call disp%show("getStripped(array, pattern, iseqVector_CK, right)")
804 call disp%show( getStripped(array, pattern, iseqVector_CK, right) )
805 call disp%show("getStripped(array, pattern, iseqVector_CK, left)")
806 call disp%show( getStripped(array, pattern, iseqVector_CK, left) )
807 call disp%skip()
808
809 end block
810
811 call disp%skip()
812 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
813 call disp%show("! Strip scalar pattern from a real array.")
814 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
815 call disp%skip()
816
817 block
818 real, allocatable :: array(:)
819 real, allocatable :: pattern
820
821 call disp%skip()
822 call disp%show("array = [2, -1, 1]")
823 array = [2, -1, 1]
824 call disp%show("pattern = 1")
825 pattern = 1
826 call disp%show("getStripped(array, pattern)")
827 call disp%show( getStripped(array, pattern) )
828 call disp%show("getStripped(array, pattern, iseqScalar_RK)")
829 call disp%show( getStripped(array, pattern, iseqScalar_RK) )
830 call disp%show("getStripped(array, pattern, leftRight)")
831 call disp%show( getStripped(array, pattern, leftRight) )
832 call disp%show("getStripped(array, pattern, right)")
833 call disp%show( getStripped(array, pattern, right) )
834 call disp%show("getStripped(array, pattern, left)")
835 call disp%show( getStripped(array, pattern, left) )
836 call disp%skip()
837
838 end block
839
840 call disp%skip()
841 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
842 call disp%show("! Strip vector pattern from a real array.")
843 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
844 call disp%skip()
845
846 block
847 real, allocatable :: array(:)
848 real, allocatable :: pattern(:)
849
850 call disp%skip()
851 call disp%show("array = [real :: ]")
852 array = [real :: ]
853 call disp%show("pattern = [real :: ]")
854 pattern = [real :: ]
855 call disp%show("getStripped(array, pattern)")
856 call disp%show( getStripped(array, pattern) )
857 call disp%show("getStripped(array, pattern, leftRight)")
858 call disp%show( getStripped(array, pattern, leftRight) )
859 call disp%show("getStripped(array, pattern, right)")
860 call disp%show( getStripped(array, pattern, right) )
861 call disp%show("getStripped(array, pattern, left)")
862 call disp%show( getStripped(array, pattern, left) )
863 call disp%skip()
864
865 call disp%skip()
866 call disp%show("array = [2, 1, 1]")
867 array = [2, 1, 1]
868 call disp%show("pattern = [real :: ]")
869 pattern = [real :: ]
870 call disp%show("getStripped(array, pattern)")
871 call disp%show( getStripped(array, pattern) )
872 call disp%show("getStripped(array, pattern, leftRight)")
873 call disp%show( getStripped(array, pattern, leftRight) )
874 call disp%show("getStripped(array, pattern, right)")
875 call disp%show( getStripped(array, pattern, right) )
876 call disp%show("getStripped(array, pattern, left)")
877 call disp%show( getStripped(array, pattern, left) )
878 call disp%skip()
879
880 call disp%skip()
881 call disp%show("array = [2, 1, 1]")
882 array = [2, 1, 1]
883 call disp%show("pattern = [1, 1]")
884 pattern = [1, 1]
885 call disp%show("getStripped(array, pattern)")
886 call disp%show( getStripped(array, pattern) )
887 call disp%show("getStripped(array, pattern, leftRight)")
888 call disp%show( getStripped(array, pattern, leftRight) )
889 call disp%show("getStripped(array, pattern, right)")
890 call disp%show( getStripped(array, pattern, right) )
891 call disp%show("getStripped(array, pattern, left)")
892 call disp%show( getStripped(array, pattern, left) )
893 call disp%skip()
894
895 call disp%skip()
896 call disp%show("array = [2, 1, 1]")
897 array = [2, 1, 1]
898 call disp%show("pattern = 3")
899 pattern = 3
900 call disp%show("getStripped(array, pattern)")
901 call disp%show( getStripped(array, pattern) )
902 call disp%show("getStripped(array, pattern, leftRight)")
903 call disp%show( getStripped(array, pattern, leftRight) )
904 call disp%show("getStripped(array, pattern, right)")
905 call disp%show( getStripped(array, pattern, right) )
906 call disp%show("getStripped(array, pattern, left)")
907 call disp%show( getStripped(array, pattern, left) )
908 call disp%skip()
909
910 call disp%skip()
911 call disp%show("array = [2, 1, 1]")
912 array = [2, 1, 1]
913 call disp%show("pattern = array")
914 pattern = array
915 call disp%show("getStripped(array, pattern)")
916 call disp%show( getStripped(array, pattern) )
917 call disp%show("getStripped(array, pattern, leftRight)")
918 call disp%show( getStripped(array, pattern, leftRight) )
919 call disp%show("getStripped(array, pattern, right)")
920 call disp%show( getStripped(array, pattern, right) )
921 call disp%show("getStripped(array, pattern, left)")
922 call disp%show( getStripped(array, pattern, left) )
923 call disp%skip()
924
925 call disp%skip()
926 call disp%show("array = [2, 1, 1]")
927 array = [2, 1, 1]
928 call disp%show("pattern = [array, real(0)]")
929 pattern = [array, real(0)]
930 call disp%show("getStripped(array, pattern)")
931 call disp%show( getStripped(array, pattern) )
932 call disp%show("getStripped(array, pattern, leftRight)")
933 call disp%show( getStripped(array, pattern, leftRight) )
934 call disp%show("getStripped(array, pattern, right)")
935 call disp%show( getStripped(array, pattern, right) )
936 call disp%show("getStripped(array, pattern, left)")
937 call disp%show( getStripped(array, pattern, left) )
938 call disp%skip()
939
940 call disp%skip()
941 call disp%show("array = [2, -1, 1]")
942 array = [2, -1, 1]
943 call disp%show("pattern = [+1, -1]")
944 pattern = [+1, -1]
945 call disp%show("getStripped(array, pattern)")
946 call disp%show( getStripped(array, pattern) )
947 call disp%show("getStripped(array, pattern, leftRight)")
948 call disp%show( getStripped(array, pattern, leftRight) )
949 call disp%show("getStripped(array, pattern, right)")
950 call disp%show( getStripped(array, pattern, right) )
951 call disp%show("getStripped(array, pattern, left)")
952 call disp%show( getStripped(array, pattern, left) )
953 call disp%show("getStripped(array, pattern, iseqVector_RK)")
954 call disp%show( getStripped(array, pattern, iseqVector_RK) )
955 call disp%show("getStripped(array, pattern, iseqVector_RK, leftRight)")
956 call disp%show( getStripped(array, pattern, iseqVector_RK, leftRight) )
957 call disp%show("getStripped(array, pattern, iseqVector_RK, right)")
958 call disp%show( getStripped(array, pattern, iseqVector_RK, right) )
959 call disp%show("getStripped(array, pattern, iseqVector_RK, left)")
960 call disp%show( getStripped(array, pattern, iseqVector_RK, left) )
961 call disp%skip()
962
963 end block
964
965contains
966
967 pure function iseqScalar_SK(segment, pattern) result(equivalent)
968 use pm_strASCII, only: getStrLower
969 character(*), intent(in) :: segment, pattern
970 logical(LK) :: equivalent
971 equivalent = getStrLower(segment) == getStrLower(pattern)
972 end
973
974 pure function iseqVector_SK(segment, pattern, sizePattern) result(equivalent)
975 use pm_strASCII, only: getStrLower
976 integer(IK) , intent(in) :: sizePattern
977 character(*), intent(in) :: segment(sizePattern), pattern(sizePattern)
978 logical(LK) :: equivalent
979 equivalent = all(getStrLower(segment) == getStrLower(pattern))
980 end
981
982 pure function iseqScalar_IK(segment, pattern) result(equivalent)
983 integer , intent(in) :: segment, pattern
984 logical(LK) :: equivalent
985 equivalent = abs(segment) == abs(pattern)
986 end
987
988 pure function iseqVector_IK(segment, pattern, sizePattern) result(equivalent)
989 integer(IK) , intent(in) :: sizePattern
990 integer , intent(in) :: segment(sizePattern), pattern(sizePattern)
991 logical(LK) :: equivalent
992 equivalent = all(abs(segment) == abs(pattern))
993 end
994
995 pure function iseqScalar_LK(segment, pattern) result(equivalent)
996 logical , intent(in) :: segment, pattern
997 logical(LK) :: equivalent
998 equivalent = segment .eqv. .not. pattern
999 end
1000
1001 pure function iseqVector_LK(segment, pattern, sizePattern) result(equivalent)
1002 integer(IK) , intent(in) :: sizePattern
1003 logical , intent(in) :: segment(sizePattern), pattern(sizePattern)
1004 logical(LK) :: equivalent
1005 equivalent = all(segment .eqv. .not. pattern)
1006 end
1007
1008 pure function iseqScalar_CK(segment, pattern) result(equivalent)
1009 complex , intent(in) :: segment, pattern
1010 logical(LK) :: equivalent
1011 equivalent = abs(segment%re) == abs(pattern%re)
1012 end
1013
1014 pure function iseqVector_CK(segment, pattern, sizePattern) result(equivalent)
1015 integer(IK) , intent(in) :: sizePattern
1016 complex , intent(in) :: segment(sizePattern), pattern(sizePattern)
1017 logical(LK) :: equivalent
1018 equivalent = all(abs(segment%re) == abs(pattern%re))
1019 end
1020
1021 pure function iseqScalar_RK(segment, pattern) result(equivalent)
1022 real , intent(in) :: segment, pattern
1023 logical(LK) :: equivalent
1024 equivalent = abs(segment) == abs(pattern)
1025 end
1026
1027 pure function iseqVector_RK(segment, pattern, sizePattern) result(equivalent)
1028 integer(IK) , intent(in) :: sizePattern
1029 real , intent(in) :: segment(sizePattern), pattern(sizePattern)
1030 logical(LK) :: equivalent
1031 equivalent = all(abs(segment) == abs(pattern))
1032 end
1033
1034end program example
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Generate and return the input string where the uppercase English alphabets are all converted to lower...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module contains the uncommon and hardly representable ASCII characters as well as procedures for...
Definition: pm_strASCII.F90:61
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Strip scalar pattern from a string scalar.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7array = ''
8pattern = ''
9getStripped(array, pattern)
10
11getStripped(array, pattern, leftRight)
12
13getStripped(array, pattern, right)
14
15getStripped(array, pattern, left)
16
17
18
19array = 'bbaaa'
20pattern = ''
21getStripped(array, pattern)
22bbaaa
23getStripped(array, pattern, leftRight)
24bbaaa
25getStripped(array, pattern, right)
26bbaaa
27getStripped(array, pattern, left)
28bbaaa
29
30
31array = 'bbaaa'
32pattern = 'a'
33getStripped(array, pattern)
34bb
35getStripped(array, pattern, leftRight)
36bb
37getStripped(array, pattern, right)
38bb
39getStripped(array, pattern, left)
40bbaaa
41
42
43array = 'bbaaa'
44pattern = 'b'
45getStripped(array, pattern)
46aaa
47getStripped(array, pattern, leftRight)
48aaa
49getStripped(array, pattern, right)
50bbaaa
51getStripped(array, pattern, left)
52aaa
53
54
55array = 'bbaaa'
56pattern = 'bbaaa '
57getStripped(array, pattern)
58bbaaa
59getStripped(array, pattern, leftRight)
60bbaaa
61getStripped(array, pattern, right)
62bbaaa
63getStripped(array, pattern, left)
64bbaaa
65
66
67array = 'bbAa'
68pattern = 'aa'
69getStripped(array, pattern)
70bbAa
71getStripped(array, pattern, iseqScalar_SK)
72bb
73getStripped(array, pattern, leftRight)
74bbAa
75getStripped(array, pattern, right)
76bbAa
77getStripped(array, pattern, left)
78bbAa
79
80
81!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82! Strip scalar pattern from a string vector.
83!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84
85
86array = [character(2) :: ]
87pattern = ''
88getStripped(array, pattern)
89
90getStripped(array, pattern, leftRight)
91
92getStripped(array, pattern, right)
93
94getStripped(array, pattern, left)
95
96
97
98array = ['bb', 'a ', 'a ']
99pattern = 'a'
100getStripped(array, pattern)
101bb
102getStripped(array, pattern, leftRight)
103bb
104getStripped(array, pattern, right)
105bb
106getStripped(array, pattern, left)
107bb, a , a
108
109
110array = ['a ', 'A ', 'bb']
111pattern = 'A '
112getStripped(array, pattern)
113a , A , bb
114getStripped(array, pattern, leftRight)
115a , A , bb
116getStripped(array, pattern, right)
117a , A , bb
118getStripped(array, pattern, left)
119a , A , bb
120getStripped(array, pattern, iseqScalar_SK)
121bb
122getStripped(array, pattern, iseqScalar_SK, leftRight)
123bb
124getStripped(array, pattern, iseqScalar_SK, right)
125a , A , bb
126getStripped(array, pattern, iseqScalar_SK, left)
127bb
128
129
130!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131! Strip vector pattern from a string vector.
132!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133
134
135array = [character(2) :: ]
136pattern = [character(1) :: ]
137getStripped(array, pattern)
138
139getStripped(array, pattern, leftRight)
140
141getStripped(array, pattern, right)
142
143getStripped(array, pattern, left)
144
145
146
147array = ['bb', 'a ', 'a ']
148pattern = [character(1) :: ]
149getStripped(array, pattern)
150bb, a , a
151getStripped(array, pattern, leftRight)
152bb, a , a
153getStripped(array, pattern, right)
154bb, a , a
155getStripped(array, pattern, left)
156bb, a , a
157
158
159array = ['bb', 'a ', 'a ']
160pattern = ['a', 'a']
161getStripped(array, pattern)
162bb
163getStripped(array, pattern, leftRight)
164bb
165getStripped(array, pattern, right)
166bb
167getStripped(array, pattern, left)
168bb, a , a
169
170
171array = ['bb', 'a ', 'a ']
172pattern = 'bbb'
173getStripped(array, pattern)
174bb, a , a
175getStripped(array, pattern, leftRight)
176bb, a , a
177getStripped(array, pattern, right)
178bb, a , a
179getStripped(array, pattern, left)
180bb, a , a
181
182
183array = ['bb', 'a ', 'a ']
184pattern = [array, ' ']
185getStripped(array, pattern)
186bb, a , a
187getStripped(array, pattern, leftRight)
188bb, a , a
189getStripped(array, pattern, right)
190bb, a , a
191getStripped(array, pattern, left)
192bb, a , a
193
194
195array = ['bb', 'a ', 'A ']
196pattern = ['A ', 'a ']
197getStripped(array, pattern)
198bb, a , A
199getStripped(array, pattern, leftRight)
200bb, a , A
201getStripped(array, pattern, right)
202bb, a , A
203getStripped(array, pattern, left)
204bb, a , A
205getStripped(array, pattern, iseqVector_SK)
206bb
207getStripped(array, pattern, iseqVector_SK, leftRight)
208bb
209getStripped(array, pattern, iseqVector_SK, right)
210bb
211getStripped(array, pattern, iseqVector_SK, left)
212bb, a , A
213
214
215!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216! Strip scalar pattern an integer array.
217!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
218
219
220array = [2, 1, 1]
221pattern = 1
222getStripped(array, pattern)
223+2
224getStripped(array, pattern, leftRight)
225+2
226getStripped(array, pattern, right)
227+2
228getStripped(array, pattern, left)
229+2, +1, +1
230
231
232array = [2, -1, 1]
233pattern = 1
234getStripped(array, pattern)
235+2, -1
236getStripped(array, pattern, leftRight)
237+2, -1
238getStripped(array, pattern, right)
239+2, -1
240getStripped(array, pattern, left)
241+2, -1, +1
242getStripped(array, pattern, iseqScalar_IK)
243+2
244getStripped(array, pattern, iseqScalar_IK, leftRight)
245+2
246getStripped(array, pattern, iseqScalar_IK, right)
247+2
248getStripped(array, pattern, iseqScalar_IK, left)
249+2, -1, +1
250
251
252!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
253! Strip vector pattern an integer array.
254!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
255
256
257array = [integer :: ]
258pattern = [integer :: ]
259getStripped(array, pattern)
260
261getStripped(array, pattern, leftRight)
262
263getStripped(array, pattern, right)
264
265getStripped(array, pattern, left)
266
267
268
269array = [2, 1, 1]
270pattern = [integer :: ]
271getStripped(array, pattern)
272+2, +1, +1
273getStripped(array, pattern, leftRight)
274+2, +1, +1
275getStripped(array, pattern, right)
276+2, +1, +1
277getStripped(array, pattern, left)
278+2, +1, +1
279
280
281array = [2, 1, 1]
282pattern = [1, 1]
283getStripped(array, pattern)
284+2
285getStripped(array, pattern, leftRight)
286+2
287getStripped(array, pattern, right)
288+2
289getStripped(array, pattern, left)
290+2, +1, +1
291
292
293array = [2, 1, 1]
294pattern = 3
295getStripped(array, pattern)
296+2, +1, +1
297getStripped(array, pattern, leftRight)
298+2, +1, +1
299getStripped(array, pattern, right)
300+2, +1, +1
301getStripped(array, pattern, left)
302+2, +1, +1
303
304
305array = [2, 1, 1]
306pattern = array
307getStripped(array, pattern)
308
309getStripped(array, pattern, leftRight)
310
311getStripped(array, pattern, right)
312
313getStripped(array, pattern, left)
314
315
316
317array = [2, 1, 1]
318pattern = [array, 0]
319getStripped(array, pattern)
320+2, +1, +1
321getStripped(array, pattern, leftRight)
322+2, +1, +1
323getStripped(array, pattern, right)
324+2, +1, +1
325getStripped(array, pattern, left)
326+2, +1, +1
327
328
329array = [2, -1, 1]
330pattern = [+1, -1]
331getStripped(array, pattern)
332+2, -1, +1
333getStripped(array, pattern, iseqVector_IK)
334+2
335getStripped(array, pattern, iseqVector_IK, leftRight)
336+2
337getStripped(array, pattern, iseqVector_IK, right)
338+2
339getStripped(array, pattern, iseqVector_IK, left)
340+2, -1, +1
341
342
343!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344! Strip scalar pattern from a logical array.
345!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
346
347
348array = [.true., .false., .false.]
349pattern = .false.
350getStripped(array, pattern)
351T
352getStripped(array, pattern, leftRight)
353T
354getStripped(array, pattern, right)
355T
356getStripped(array, pattern, left)
357T, F, F
358
359
360array = [.false., .true., .true.]
361pattern = .false.
362getStripped(array, pattern)
363T, T
364getStripped(array, pattern, leftRight)
365T, T
366getStripped(array, pattern, right)
367F, T, T
368getStripped(array, pattern, left)
369T, T
370getStripped(array, pattern, iseqScalar_LK)
371F
372getStripped(array, pattern, iseqScalar_LK, leftRight)
373F
374getStripped(array, pattern, iseqScalar_LK, right)
375F
376getStripped(array, pattern, iseqScalar_LK, left)
377F, T, T
378
379
380!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
381! Strip vector pattern from a logical array.
382!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
383
384
385array = [logical :: ]
386pattern = [logical :: ]
387getStripped(array, pattern)
388
389getStripped(array, pattern, leftRight)
390
391getStripped(array, pattern, right)
392
393getStripped(array, pattern, left)
394
395
396
397array = [.true., .false., .false.]
398pattern = [logical :: ]
399getStripped(array, pattern)
400T, F, F
401getStripped(array, pattern, leftRight)
402T, F, F
403getStripped(array, pattern, right)
404T, F, F
405getStripped(array, pattern, left)
406T, F, F
407
408
409array = [.true., .false., .false.]
410pattern = [.false., .false.]
411getStripped(array, pattern)
412T
413getStripped(array, pattern, leftRight)
414T
415getStripped(array, pattern, right)
416T
417getStripped(array, pattern, left)
418T, F, F
419
420
421array = [.true., .false., .false.]
422pattern = [.true., .true.]
423getStripped(array, pattern)
424T, F, F
425getStripped(array, pattern, leftRight)
426T, F, F
427getStripped(array, pattern, right)
428T, F, F
429getStripped(array, pattern, left)
430T, F, F
431
432
433array = [.true., .false., .false.]
434pattern = array
435getStripped(array, pattern)
436
437getStripped(array, pattern, leftRight)
438
439getStripped(array, pattern, right)
440
441getStripped(array, pattern, left)
442
443
444
445array = [.true., .false., .false.]
446pattern = [array, .false.]
447getStripped(array, pattern)
448T, F, F
449getStripped(array, pattern, leftRight)
450T, F, F
451getStripped(array, pattern, right)
452T, F, F
453getStripped(array, pattern, left)
454T, F, F
455
456
457array = [.true., .true., .false.]
458pattern = [.false., .true.]
459getStripped(array, pattern)
460T, T, F
461getStripped(array, pattern, leftRight)
462T, T, F
463getStripped(array, pattern, right)
464T, T, F
465getStripped(array, pattern, left)
466T, T, F
467getStripped(array, pattern, iseqVector_LK)
468T
469getStripped(array, pattern, iseqVector_LK, leftRight)
470T
471getStripped(array, pattern, iseqVector_LK, right)
472T
473getStripped(array, pattern, iseqVector_LK, left)
474T, T, F
475
476
477!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
478! Strip scalar pattern from a complex array.
479!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
480
481
482array = [2, 1, 1]
483pattern = 1
484getStripped(array, pattern)
485(+2.00000000, +0.00000000)
486getStripped(array, pattern, leftRight)
487(+2.00000000, +0.00000000)
488getStripped(array, pattern, right)
489(+2.00000000, +0.00000000)
490getStripped(array, pattern, left)
491(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
492
493
494array = [2, -1, 1]
495pattern = 1
496getStripped(array, pattern)
497(+2.00000000, +0.00000000), (-1.00000000, +0.00000000)
498getStripped(array, pattern, leftRight)
499(+2.00000000, +0.00000000), (-1.00000000, +0.00000000)
500getStripped(array, pattern, right)
501(+2.00000000, +0.00000000), (-1.00000000, +0.00000000)
502getStripped(array, pattern, left)
503(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
504getStripped(array, pattern, iseqScalar_CK)
505(+2.00000000, +0.00000000)
506getStripped(array, pattern, iseqScalar_CK, leftRight)
507(+2.00000000, +0.00000000)
508getStripped(array, pattern, iseqScalar_CK, right)
509(+2.00000000, +0.00000000)
510getStripped(array, pattern, iseqScalar_CK, left)
511(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
512
513
514!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
515! Strip vector pattern from a complex array.
516!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
517
518
519array = [complex :: ]
520pattern = [complex :: ]
521getStripped(array, pattern)
522
523getStripped(array, pattern, leftRight)
524
525getStripped(array, pattern, right)
526
527getStripped(array, pattern, left)
528
529
530
531array = [2, 1, 1]
532pattern = [complex :: ]
533getStripped(array, pattern)
534(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
535getStripped(array, pattern, leftRight)
536(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
537getStripped(array, pattern, right)
538(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
539getStripped(array, pattern, left)
540(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
541
542
543array = [2, 1, 1]
544pattern = [1, 1]
545getStripped(array, pattern)
546(+2.00000000, +0.00000000)
547getStripped(array, pattern, leftRight)
548(+2.00000000, +0.00000000)
549getStripped(array, pattern, right)
550(+2.00000000, +0.00000000)
551getStripped(array, pattern, left)
552(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
553
554
555array = [2, 1, 1]
556pattern = 3
557getStripped(array, pattern)
558(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
559getStripped(array, pattern, leftRight)
560(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
561getStripped(array, pattern, right)
562(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
563getStripped(array, pattern, left)
564(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
565
566
567array = [2, 1, 1]
568pattern = array
569getStripped(array, pattern)
570
571getStripped(array, pattern, leftRight)
572
573getStripped(array, pattern, right)
574
575getStripped(array, pattern, left)
576
577
578
579array = [2, 1, 1]
580pattern = [array, cmplx(0)]
581getStripped(array, pattern)
582(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
583getStripped(array, pattern, leftRight)
584(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
585getStripped(array, pattern, right)
586(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
587getStripped(array, pattern, left)
588(+2.00000000, +0.00000000), (+1.00000000, +0.00000000), (+1.00000000, +0.00000000)
589
590
591array = [2, -1, 1]
592pattern = [+1, -1]
593getStripped(array, pattern)
594(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
595getStripped(array, pattern, leftRight)
596(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
597getStripped(array, pattern, right)
598(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
599getStripped(array, pattern, left)
600(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
601getStripped(array, pattern, iseqVector_CK)
602(+2.00000000, +0.00000000)
603getStripped(array, pattern, iseqVector_CK, leftRight)
604(+2.00000000, +0.00000000)
605getStripped(array, pattern, iseqVector_CK, right)
606(+2.00000000, +0.00000000)
607getStripped(array, pattern, iseqVector_CK, left)
608(+2.00000000, +0.00000000), (-1.00000000, +0.00000000), (+1.00000000, +0.00000000)
609
610
611!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
612! Strip scalar pattern from a real array.
613!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
614
615
616array = [2, -1, 1]
617pattern = 1
618getStripped(array, pattern)
619+2.00000000, -1.00000000
620getStripped(array, pattern, iseqScalar_RK)
621+2.00000000
622getStripped(array, pattern, leftRight)
623+2.00000000, -1.00000000
624getStripped(array, pattern, right)
625+2.00000000, -1.00000000
626getStripped(array, pattern, left)
627+2.00000000, -1.00000000, +1.00000000
628
629
630!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
631! Strip vector pattern from a real array.
632!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
633
634
635array = [real :: ]
636pattern = [real :: ]
637getStripped(array, pattern)
638
639getStripped(array, pattern, leftRight)
640
641getStripped(array, pattern, right)
642
643getStripped(array, pattern, left)
644
645
646
647array = [2, 1, 1]
648pattern = [real :: ]
649getStripped(array, pattern)
650+2.00000000, +1.00000000, +1.00000000
651getStripped(array, pattern, leftRight)
652+2.00000000, +1.00000000, +1.00000000
653getStripped(array, pattern, right)
654+2.00000000, +1.00000000, +1.00000000
655getStripped(array, pattern, left)
656+2.00000000, +1.00000000, +1.00000000
657
658
659array = [2, 1, 1]
660pattern = [1, 1]
661getStripped(array, pattern)
662+2.00000000
663getStripped(array, pattern, leftRight)
664+2.00000000
665getStripped(array, pattern, right)
666+2.00000000
667getStripped(array, pattern, left)
668+2.00000000, +1.00000000, +1.00000000
669
670
671array = [2, 1, 1]
672pattern = 3
673getStripped(array, pattern)
674+2.00000000, +1.00000000, +1.00000000
675getStripped(array, pattern, leftRight)
676+2.00000000, +1.00000000, +1.00000000
677getStripped(array, pattern, right)
678+2.00000000, +1.00000000, +1.00000000
679getStripped(array, pattern, left)
680+2.00000000, +1.00000000, +1.00000000
681
682
683array = [2, 1, 1]
684pattern = array
685getStripped(array, pattern)
686
687getStripped(array, pattern, leftRight)
688
689getStripped(array, pattern, right)
690
691getStripped(array, pattern, left)
692
693
694
695array = [2, 1, 1]
696pattern = [array, real(0)]
697getStripped(array, pattern)
698+2.00000000, +1.00000000, +1.00000000
699getStripped(array, pattern, leftRight)
700+2.00000000, +1.00000000, +1.00000000
701getStripped(array, pattern, right)
702+2.00000000, +1.00000000, +1.00000000
703getStripped(array, pattern, left)
704+2.00000000, +1.00000000, +1.00000000
705
706
707array = [2, -1, 1]
708pattern = [+1, -1]
709getStripped(array, pattern)
710+2.00000000, -1.00000000, +1.00000000
711getStripped(array, pattern, leftRight)
712+2.00000000, -1.00000000, +1.00000000
713getStripped(array, pattern, right)
714+2.00000000, -1.00000000, +1.00000000
715getStripped(array, pattern, left)
716+2.00000000, -1.00000000, +1.00000000
717getStripped(array, pattern, iseqVector_RK)
718+2.00000000
719getStripped(array, pattern, iseqVector_RK, leftRight)
720+2.00000000
721getStripped(array, pattern, iseqVector_RK, right)
722+2.00000000
723getStripped(array, pattern, iseqVector_RK, left)
724+2.00000000, -1.00000000, +1.00000000
725
726
Test:
test_pm_arrayStrip


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 197 of file pm_arrayStrip.F90.


The documentation for this interface was generated from the following file: