You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to get an option for an allocatable character variable, %get returns an empty string. If I change the character(:), allocatable :: cvar declaration to character(64) :: cvar, it works as it should be. Should allocatables be avoided or is there a solution to this issue?
program test
use finer, only: file_ini
use penf, only: i4p
implicit nonecharacter(:), allocatable :: cvar
type(file_ini) :: config
integer(i4p) :: error
call config%load(filename="test.ini",error=error)
if(error==0)thencall config%get(section_name="workspace",option_name='id', val=cvar, error=error)
end ifend program test
here cvar returned as undefined pointer/array where test.ini is as follow
[workspace]id = test_1207 ; title of the analysis
....
The text was updated successfully, but these errors were encountered:
thank you for pointing it out. Currently, allocatable val dummy arguments are not supported (not only character, but all other types must be a priori allocated. Supporting allocatable val arguments is not simple and for now I have not enough time to try to implement it, sorry.
Thank you for your quick reply. I follow your projects closely with admiration. Thank you for bringing all these functional libraries to the Fortran community.
When I try to get an option for an allocatable character variable,
%get
returns an empty string. If I change thecharacter(:), allocatable :: cvar
declaration tocharacter(64) :: cvar
, it works as it should be. Should allocatables be avoided or is there a solution to this issue?here
cvar
returned as undefined pointer/array wheretest.ini
is as followThe text was updated successfully, but these errors were encountered: