Open
Description
Many other languages allow i += 1
instead of i = i + 1
. When you are incrementing a variable with a long name, or an array section, or a component of a derived type, it is possible to write i = j + 1
by mistake, where it was intended that i
be incremented. Therefore I suggest that stdlib have an elemental increment
subroutine that works with real and integer types, so that
call increment(i,inc)
has the same meaning as
i = i + inc
I got this idea from Nim, where you can write inc(i,1)
instead of i = i + 1
Metadata
Metadata
Assignees
Labels
No labels