Logo

Programming-Idioms

History of Idiom 44 > diff from v33 to v34

Edit summary for version 34 by tkoenig:
New Fortran implementation by user [tkoenig]

Version 33

2019-09-26, 16:11:54

Version 34

2019-09-27, 13:45:31

Idiom #44 Insert element in list

Insert element x at position i in list s. Further elements must be shifted to the right.

Illustration

Idiom #44 Insert element in list

Insert element x at position i in list s. Further elements must be shifted to the right.

Illustration
Code
integer, dimension(:), allocatable :: s

s = [s(1:i-1), x, s(i:)]