Skip to content

Rewrite fypp directive to avoid the use of removesuffix in stdlib_math_meshgrip #847

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

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/stdlib_math_meshgrid.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
do i${j}$ = 1, size(x${j}$)
#:endfor
#:for j in indices
xm${j}$(${"".join(f"i{j}," for j in indices).removesuffix(",")}$) = &
xm${j}$(${",".join(f"i{j}" for j in indices)}$) = &
x${j}$(i${j}$)
#:endfor
#:for j in indices
Expand All @@ -33,7 +33,7 @@ contains
#: set RName = rname("meshgrid", rank, t1, k1)
module procedure ${RName}$

integer :: ${"".join(f"i{j}," for j in range(1, rank + 1)).removesuffix(",")}$
integer :: ${",".join(f"i{j}" for j in range(1, rank + 1))}$

select case (optval(indexing, stdlib_meshgrid_xy))
case (stdlib_meshgrid_xy)
Expand All @@ -47,4 +47,4 @@ contains
#:endfor
#:endfor

end submodule
end submodule
Loading