public subroutine placeat_ga_varop(me, val, pos, length)
adds the value to a given position inside the growing array.
if the requested position is outside the current array bounds, the array
will be resized accordingly. if it is inside the current array bounds, the
element at the requested position will be replaced.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine placeat_ga_varop(me,val,pos,length)type(grw_varoparray_type)::me!< array to place the value intotype(tem_varsys_op_type),intent(in)::val!< value to place at the given positioninteger,intent(in)::pos!< predefined position!> optional length to expand the arrayinteger,intent(in),optional::length! value to append is larger than all existing ones,! just put it to the end of the list, this captures! also the case of empty lists.! in this case foundpos = me%nvals + 1 holds.if(pos>me%containersize)then! expand the array, if its boundary is reachedcall expand(me=me,pos=pos,length=length)end ifme%nvals=max(pos,me%nvals)me%val(pos)=valend subroutine placeat_ga_varop