Description:
A wrapper
around PSX_WORDEXP that only returns files that match the supplied WORDS string following
expansion. EXPAN will be an empty string if there are no matches and CONECT will be set to 0.
Invocation
CALL ONE_WORDEXP_FILE( WORDS, CONTEXT, EXPAN, STATUS )
Arguments
WORDS =
CHARACTER()
(Given)
The string to be shell expanded.
CONTEXT = INTEGER (Given & Returned)
Should be
initialised to 0 for initial shell expansion. Will be set to zero when no more results are available.
EXPAN =
CHARACTER()
(Given)
Expanded string. A new string will be returned each call until all are returned an
CONTEXT is set to 0.
STATUS = INTEGER (Given & Returned)
The global status.
Notes:
-
Continue to call this routine until CONTEXT is set to 0, otherwise there will be a possible memory
leak.
-
If there are multiple returns from PSX_WORDEXP that are not files this routine will loop internally
until a valid file is located.
Copyright © 2000 Council for the Central Laboratory of the Research Councils