Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fson_string), | pointer | :: | str | |||
character, | intent(in) | :: | c |
recursive subroutine append_char(str, c)
type(fson_string), pointer :: str
character, intent(in) :: c
if (str % index >= BLOCK_SIZE) then
!set down the chain
call allocate_block(str)
call append_char(str % next, c)
else
! set local
str % index = str % index + 1
str % chars(str % index:str % index) = c
end if
end subroutine append_char