Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to add back argument to find function #442

Open
aman-godara opened this issue Jun 24, 2021 · 2 comments
Open

to add back argument to find function #442

aman-godara opened this issue Jun 24, 2021 · 2 comments
Labels
idea Proposition of an idea and opening an issue to discuss it topic: strings String processing

Comments

@aman-godara
Copy link
Member

Description

Proposal (by @everythingfunctional) to add back argument to find function (as merged in PR: #433)

Often there is a back=.false. argument to functions like this (i.e. the intrinsic function index, which is very much like this one).

Prior Art

intrinsic index of fortran provides back argument.

@aman-godara aman-godara added the idea Proposition of an idea and opening an issue to discuss it label Jun 24, 2021
@aman-godara
Copy link
Member Author

A possible way IMO of doing this is to make a new function find_low_level and cut & paste all the code written in find_char_char to this new function. I will keep this new function private and out of the interface find. Then I can add back argument to all the 4 functions that are in find interface. So, these 4 functions will call the find_low_level in their implementation. find_low_level will not take any back argument, rather these 4 high level functions will take care of the back argument and modify the input given by user accordingly before calling find_low_level.

This is one of the possible ways of implementing back feature by building upon find_low_level function (which provides with essential features like occurrence, consider_overlapping).

@aman-godara
Copy link
Member Author

aman-godara@9a8303b

@awvwgk awvwgk added the topic: strings String processing label Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Proposition of an idea and opening an issue to discuss it topic: strings String processing
Projects
None yet
Development

No branches or pull requests

2 participants