Commits

Harald Klimach committed 2e0a5ea

Renamed the returned vals in top interfaces to be consistent with scalar ones:
get_top_val now uses top_val in all the public interfaces.

Comments (0)

Files changed (1)

source/aot_vector_module.f90

     module procedure get_config_logical_vvect
   end interface
 
+  interface get_top_val
+    module procedure get_top_real_vvect
+    module procedure get_top_double_vvect
+    module procedure get_top_integer_vvect
+    module procedure get_top_long_vvect
+    module procedure get_top_logical_vvect
+  end interface get_top_val
+
+
   !> Use these routines to obtain a vector of known length.
   !!
   !! The given vector has to exist already and will be filled by
   end interface
 
   interface get_top_val
-    module procedure get_top_real_vvect
-    module procedure get_top_double_vvect
-    module procedure get_top_integer_vvect
-    module procedure get_top_long_vvect
-    module procedure get_top_logical_vvect
-
     module procedure get_top_real_v
     module procedure get_top_double_v
     module procedure get_top_integer_v
 
 
 
-  subroutine get_top_real_vvect(conf, tab_val, ErrCode, maxlength, default)
+  subroutine get_top_real_vvect(conf, top_val, ErrCode, maxlength, default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table, will have the same length as the table
     !! but not exceed maxlength, if provided.
-    real(kind=single_k), intent(out), allocatable :: tab_val(:)
+    real(kind=single_k), intent(out), allocatable :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
     !! Will be allocated with the same length as the returned vector.
 
     ! Now parse the table with the vector entries.
     if (aot_table_first(conf, vect_handle)) then
-      allocate(tab_val(vect_len))
+      allocate(top_val(vect_len))
       allocate(errCode(vect_len))
 
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
     else
       ! No vector definition found in the Lua script, use the default.
       if (present(default)) then
-        allocate(tab_val(def_len))
+        allocate(top_val(def_len))
         allocate(errCode(vect_len))
-        tab_val = default
+        top_val = default
         ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       else
         ! No vector definition in the Lua script and no default provided,
         ! return an empty array.
-        allocate(tab_val(0))
+        allocate(top_val(0))
         allocate(errCode(0))
       end if
     end if
 
 
 
-  subroutine get_top_double_vvect(conf, tab_val, ErrCode, maxlength, default)
+  subroutine get_top_double_vvect(conf, top_val, ErrCode, maxlength, default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table, will have the same length as the table
     !! but not exceed maxlength, if provided.
-    real(kind=double_k), intent(out), allocatable :: tab_val(:)
+    real(kind=double_k), intent(out), allocatable :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
     !! Will be allocated with the same length as the returned vector.
 
     ! Now parse the table with the vector entries.
     if (aot_table_first(conf, vect_handle)) then
-      allocate(tab_val(vect_len))
+      allocate(top_val(vect_len))
       allocate(errCode(vect_len))
 
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
     else
       ! No vector definition found in the Lua script, use the default.
       if (present(default)) then
-        allocate(tab_val(def_len))
+        allocate(top_val(def_len))
         allocate(errCode(vect_len))
-        tab_val = default
+        top_val = default
         ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       else
         ! No vector definition in the Lua script and no default provided,
         ! return an empty array.
-        allocate(tab_val(0))
+        allocate(top_val(0))
         allocate(errCode(0))
       end if
     end if
   end subroutine get_top_double_vvect
 
 
-  subroutine get_top_integer_vvect(conf, tab_val, ErrCode, maxlength, default)
+  subroutine get_top_integer_vvect(conf, top_val, ErrCode, maxlength, default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table, will have the same length as the table
     !! but not exceed maxlength, if provided.
-    integer, intent(out), allocatable :: tab_val(:)
+    integer, intent(out), allocatable :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
     !! Will be allocated with the same length as the returned vector.
 
     ! Now parse the table with the vector entries.
     if (aot_table_first(conf, vect_handle)) then
-      allocate(tab_val(vect_len))
+      allocate(top_val(vect_len))
       allocate(errCode(vect_len))
 
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
     else
       ! No vector definition found in the Lua script, use the default.
       if (present(default)) then
-        allocate(tab_val(def_len))
+        allocate(top_val(def_len))
         allocate(errCode(vect_len))
-        tab_val = default
+        top_val = default
         ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       else
         ! No vector definition in the Lua script and no default provided,
         ! return an empty array.
-        allocate(tab_val(0))
+        allocate(top_val(0))
         allocate(errCode(0))
       end if
     end if
   end subroutine get_top_integer_vvect
 
 
-  subroutine get_top_long_vvect(conf, tab_val, ErrCode, maxlength, default)
+  subroutine get_top_long_vvect(conf, top_val, ErrCode, maxlength, default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table, will have the same length as the table
     !! but not exceed maxlength, if provided.
-    integer(kind=long_k), intent(out), allocatable :: tab_val(:)
+    integer(kind=long_k), intent(out), allocatable :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
     !! Will be allocated with the same length as the returned vector.
 
     ! Now parse the table with the vector entries.
     if (aot_table_first(conf, vect_handle)) then
-      allocate(tab_val(vect_len))
+      allocate(top_val(vect_len))
       allocate(errCode(vect_len))
 
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
     else
       ! No vector definition found in the Lua script, use the default.
       if (present(default)) then
-        allocate(tab_val(def_len))
+        allocate(top_val(def_len))
         allocate(errCode(vect_len))
-        tab_val = default
+        top_val = default
         ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       else
         ! No vector definition in the Lua script and no default provided,
         ! return an empty array.
-        allocate(tab_val(0))
+        allocate(top_val(0))
         allocate(errCode(0))
       end if
     end if
   end subroutine get_top_long_vvect
 
 
-  subroutine get_top_logical_vvect(conf, tab_val, ErrCode, maxlength, default)
+  subroutine get_top_logical_vvect(conf, top_val, ErrCode, maxlength, default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table, will have the same length as the table
     !! but not exceed maxlength, if provided.
-    logical, intent(out), allocatable :: tab_val(:)
+    logical, intent(out), allocatable :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
     !! Will be allocated with the same length as the returned vector.
 
     ! Now parse the table with the vector entries.
     if (aot_table_first(conf, vect_handle)) then
-      allocate(tab_val(vect_len))
+      allocate(top_val(vect_len))
       allocate(errCode(vect_len))
 
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
     else
       ! No vector definition found in the Lua script, use the default.
       if (present(default)) then
-        allocate(tab_val(def_len))
+        allocate(top_val(def_len))
         allocate(errCode(vect_len))
-        tab_val = default
+        top_val = default
         ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       else
         ! No vector definition in the Lua script and no default provided,
         ! return an empty array.
-        allocate(tab_val(0))
+        allocate(top_val(0))
         allocate(errCode(0))
       end if
     end if
 
 
 
-  subroutine get_top_real_v(conf, tab_val, ErrCode,  default)
+  subroutine get_top_real_v(conf, top_val, ErrCode,  default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table.
-    real(kind=single_k), intent(out) :: tab_val(:)
+    real(kind=single_k), intent(out) :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as tab_val.
+    !! This array has to have the same length as top_val.
     integer, intent(out) :: ErrCode(:)
 
     !> A default vector to use, if no proper definition is found.
     vect_handle = aot_table_top(L=conf)
     table_len = aot_table_length(L=conf, thandle=vect_handle)
 
-    vect_len = min(table_len, size(tab_val))
+    vect_len = min(table_len, size(top_val))
 
     ! Find the length of the default value, if it is not provided, its 0.
     def_len = 0
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
 
       ! If the table in the Lua script is not long enough, fill the remaining
       ! components with the default components, as far as they are defined.
       do iComp=vect_len+1,def_len
         ErrCode(iComp) = ibSet(ErrCode(iComp), aoterr_NonExistent)
-        tab_val(iComp) = default(iComp)
+        top_val(iComp) = default(iComp)
       end do
       vect_lb = max(vect_len+1, def_len)
       do iComp=vect_lb,vect_len
       ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       if (present(default)) then
         minub = min(vect_len, def_len)
-        tab_val(:minub) = default(:minub)
+        top_val(:minub) = default(:minub)
         if (minub < vect_len) then
           ErrCode(minub+1:) = ibSet(ErrCode(minub+1:), aoterr_Fatal)
         end if
   end subroutine get_top_real_v
 
 
-  subroutine get_top_double_v(conf, tab_val, ErrCode,  default)
+  subroutine get_top_double_v(conf, top_val, ErrCode,  default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table.
-    real(kind=double_k), intent(out) :: tab_val(:)
+    real(kind=double_k), intent(out) :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as tab_val.
+    !! This array has to have the same length as top_val.
     integer, intent(out) :: ErrCode(:)
 
     !> A default vector to use, if no proper definition is found.
     vect_handle = aot_table_top(L=conf)
     table_len = aot_table_length(L=conf, thandle=vect_handle)
 
-    vect_len = min(table_len, size(tab_val))
+    vect_len = min(table_len, size(top_val))
 
     ! Find the length of the default value, if it is not provided, its 0.
     def_len = 0
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
 
       ! If the table in the Lua script is not long enough, fill the remaining
       ! components with the default components, as far as they are defined.
       do iComp=vect_len+1,def_len
         ErrCode(iComp) = ibSet(ErrCode(iComp), aoterr_NonExistent)
-        tab_val(iComp) = default(iComp)
+        top_val(iComp) = default(iComp)
       end do
       vect_lb = max(vect_len+1, def_len)
       do iComp=vect_lb,vect_len
       ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       if (present(default)) then
         minub = min(vect_len, def_len)
-        tab_val(:minub) = default(:minub)
+        top_val(:minub) = default(:minub)
         if (minub < vect_len) then
           ErrCode(minub+1:) = ibSet(ErrCode(minub+1:), aoterr_Fatal)
         end if
   end subroutine get_top_double_v
 
 
-  subroutine get_top_integer_v(conf, tab_val, ErrCode,  default)
+  subroutine get_top_integer_v(conf, top_val, ErrCode,  default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table.
-    integer, intent(out) :: tab_val(:)
+    integer, intent(out) :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as tab_val.
+    !! This array has to have the same length as top_val.
     integer, intent(out) :: ErrCode(:)
 
     !> A default vector to use, if no proper definition is found.
     vect_handle = aot_table_top(L=conf)
     table_len = aot_table_length(L=conf, thandle=vect_handle)
 
-    vect_len = min(table_len, size(tab_val))
+    vect_len = min(table_len, size(top_val))
 
     ! Find the length of the default value, if it is not provided, its 0.
     def_len = 0
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
 
       ! If the table in the Lua script is not long enough, fill the remaining
       ! components with the default components, as far as they are defined.
       do iComp=vect_len+1,def_len
         ErrCode(iComp) = ibSet(ErrCode(iComp), aoterr_NonExistent)
-        tab_val(iComp) = default(iComp)
+        top_val(iComp) = default(iComp)
       end do
       vect_lb = max(vect_len+1, def_len)
       do iComp=vect_lb,vect_len
       ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       if (present(default)) then
         minub = min(vect_len, def_len)
-        tab_val(:minub) = default(:minub)
+        top_val(:minub) = default(:minub)
         if (minub < vect_len) then
           ErrCode(minub+1:) = ibSet(ErrCode(minub+1:), aoterr_Fatal)
         end if
   end subroutine get_top_integer_v
 
 
-  subroutine get_top_long_v(conf, tab_val, ErrCode,  default)
+  subroutine get_top_long_v(conf, top_val, ErrCode,  default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table.
-    integer(kind=long_k), intent(out) :: tab_val(:)
+    integer(kind=long_k), intent(out) :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as tab_val.
+    !! This array has to have the same length as top_val.
     integer, intent(out) :: ErrCode(:)
 
     !> A default vector to use, if no proper definition is found.
     vect_handle = aot_table_top(L=conf)
     table_len = aot_table_length(L=conf, thandle=vect_handle)
 
-    vect_len = min(table_len, size(tab_val))
+    vect_len = min(table_len, size(top_val))
 
     ! Find the length of the default value, if it is not provided, its 0.
     def_len = 0
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
 
       ! If the table in the Lua script is not long enough, fill the remaining
       ! components with the default components, as far as they are defined.
       do iComp=vect_len+1,def_len
         ErrCode(iComp) = ibSet(ErrCode(iComp), aoterr_NonExistent)
-        tab_val(iComp) = default(iComp)
+        top_val(iComp) = default(iComp)
       end do
       vect_lb = max(vect_len+1, def_len)
       do iComp=vect_lb,vect_len
       ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       if (present(default)) then
         minub = min(vect_len, def_len)
-        tab_val(:minub) = default(:minub)
+        top_val(:minub) = default(:minub)
         if (minub < vect_len) then
           ErrCode(minub+1:) = ibSet(ErrCode(minub+1:), aoterr_Fatal)
         end if
   end subroutine get_top_long_v
 
 
-  subroutine get_top_logical_v(conf, tab_val, ErrCode,  default)
+  subroutine get_top_logical_v(conf, top_val, ErrCode,  default)
     type(flu_State) :: conf !< Handle to the lua script
 
     !> Vector read from the Lua table.
-    logical, intent(out) :: tab_val(:)
+    logical, intent(out) :: top_val(:)
 
     !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as tab_val.
+    !! This array has to have the same length as top_val.
     integer, intent(out) :: ErrCode(:)
 
     !> A default vector to use, if no proper definition is found.
     vect_handle = aot_table_top(L=conf)
     table_len = aot_table_length(L=conf, thandle=vect_handle)
 
-    vect_len = min(table_len, size(tab_val))
+    vect_len = min(table_len, size(top_val))
 
     ! Find the length of the default value, if it is not provided, its 0.
     def_len = 0
       ! Only if the vector table actually exists, and has at least one entry,
       ! this parsing has to be done.
       if (present(default).and.(def_len > 0)) then
-        call get_top_val(conf, tab_val(1), ErrCode(1), default(1))
+        call get_top_val(conf, top_val(1), ErrCode(1), default(1))
       else
-        call get_top_val(conf, tab_val(1), ErrCode(1))
+        call get_top_val(conf, top_val(1), ErrCode(1))
       end if
 
       ! Up to the length of the default value, provide the default settings.
       do iComp=2,def_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp), default(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp), default(iComp))
       end do
 
       vect_lb = max(2, def_len)
       ! available anymore, proceed without a default setting for the rest.
       do iComp=vect_lb,vect_len
         if (.not. flu_next(conf, vect_handle)) exit
-        call get_top_val(conf, tab_val(iComp), ErrCode(iComp))
+        call get_top_val(conf, top_val(iComp), ErrCode(iComp))
       end do
 
       ! If the table in the Lua script is not long enough, fill the remaining
       ! components with the default components, as far as they are defined.
       do iComp=vect_len+1,def_len
         ErrCode(iComp) = ibSet(ErrCode(iComp), aoterr_NonExistent)
-        tab_val(iComp) = default(iComp)
+        top_val(iComp) = default(iComp)
       end do
       vect_lb = max(vect_len+1, def_len)
       do iComp=vect_lb,vect_len
       ErrCode = ibSet(ErrCode, aoterr_NonExistent)
       if (present(default)) then
         minub = min(vect_len, def_len)
-        tab_val(:minub) = default(:minub)
+        top_val(:minub) = default(:minub)
         if (minub < vect_len) then
           ErrCode(minub+1:) = ibSet(ErrCode(minub+1:), aoterr_Fatal)
         end if