subroutineevaluate_fstringrecursiveprivate
recursive subroutine evaluate_fstring(c, id, v)
An f-string.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| c | type(fypp_t) | inout | the state | |
| id | integer | in | the expression | |
| v | type(value_t) | out | the result |
Calls
Source
Show the code
recursive subroutine evaluate_fstring(c, id, v)
type(fypp_t), intent(inout) :: c !! the state
integer, intent(in) :: id !! the expression
type(value_t), intent(out) :: v !! the result
type(buffer_t) :: b
type(value_t) :: part
character(len=:), allocatable :: text
integer :: k
do k = 1, size(c%exprs(id)%args)
call evaluate(c, c%exprs(id)%args(k), part)
if (allocated(c%error)) return
call write_value(part, .false., b)
end do
call take(b, text)
call make_string(text, v)
end subroutine evaluate_fstring