Commits

Manuel Hasert committed cbb63d2

fix bug in reading long integers

Comments (0)

Files changed (1)

source/aotus_module.f90

       not_retrievable = .true.
     else
       if (flu_isNumber(conf, -1)) then
-        top_val = int(flu_toNumber(conf, -1))
+        top_val = int(flu_toDouble(conf, -1))
       else
         ErrCode = ibSet(ErrCode, aoterr_WrongType)
         ErrCode = ibSet(ErrCode, aoterr_Fatal)
       not_retrievable = .true.
     else
       if (flu_isNumber(conf, -1)) then
-        top_val = int(flu_toNumber(conf, -1),kind=long_k)
+        top_val = int(flu_toDouble(conf, -1),kind=long_k)
       else
         ErrCode = ibSet(ErrCode, aoterr_WrongType)
         ErrCode = ibSet(ErrCode, aoterr_Fatal)
 
     call flu_getglobal(conf, var)
     call get_top_val(conf, conf_val, ErrCode, default)
+    write(*,*) 'get config long:',conf_val
 
   end subroutine get_config_long