Get a logical value of a given name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CFG_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | var_name | |||
| logical, | intent(out) | :: | res |
subroutine get_logic(cfg, var_name, res) type(CFG_t), intent(inout) :: cfg character(len=*), intent(in) :: var_name logical, intent(out) :: res integer :: ix call prepare_get_var(cfg, var_name, CFG_logic_type, 1, ix) res = cfg%vars(ix)%logic_data(1) end subroutine get_logic