Resize the storage size of variable, which can be of type integer, logical, real or character
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CFG_var_t), | intent(inout) | :: | variable |
subroutine resize_storage(variable) type(CFG_var_t), intent(inout) :: variable select case (variable%var_type) case (CFG_integer_type) deallocate( variable%int_data ) allocate( variable%int_data(variable%var_size) ) case (CFG_logic_type) deallocate( variable%logic_data ) allocate( variable%logic_data(variable%var_size) ) case (CFG_real_type) deallocate( variable%real_data ) allocate( variable%real_data(variable%var_size) ) case (CFG_string_type) deallocate( variable%char_data ) allocate( variable%char_data(variable%var_size) ) end select end subroutine resize_storage