Commits

Manuel Hasert committed 41c37c2

renamed aot_put_val to aot_out_val to make the interface consistent

Comments (0)

Files changed (2)

source/aot_out_module.f90

   implicit none
 
   public :: aot_out_type
-  public :: aot_put_val
+  public :: aot_out_val
   public :: aot_out_open
   public :: aot_out_close
   public :: aot_out_open_table
   end type
 
   !> Put Fortran intrinsic types into the script.
-  interface aot_put_val
-    module procedure aot_put_val_int
-    module procedure aot_put_val_long
-    module procedure aot_put_val_real
-    module procedure aot_put_val_double
-    module procedure aot_put_val_logical
-    module procedure aot_put_val_string
+  interface aot_out_val
+    module procedure aot_out_val_int
+    module procedure aot_out_val_long
+    module procedure aot_out_val_real
+    module procedure aot_out_val_double
+    module procedure aot_out_val_logical
+    module procedure aot_out_val_string
   end interface
 
   private
 !******************************************************************************!
 !>  Put integer variables into the Lua script.
 !!
-  subroutine aot_put_val_int(put_conf, val, vname)
+  subroutine aot_out_val_int(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
       write(put_conf%outunit, fmt="(a,i0)", advance=adv_string) indent, val
     end if
 
-  end subroutine aot_put_val_int
+  end subroutine aot_out_val_int
 !******************************************************************************!
 
 
 !******************************************************************************!
 !>  Put long variables into the Lua script.
 !!
-  subroutine aot_put_val_long(put_conf, val, vname)
+  subroutine aot_out_val_long(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
       write(put_conf%outunit, fmt="(a,i0)", advance=adv_string) indent, val
     end if
 
-  end subroutine aot_put_val_long
+  end subroutine aot_out_val_long
 !******************************************************************************!
 
 
 !******************************************************************************!
 !>  Put real variables into the Lua script.
 !!
-  subroutine aot_put_val_real(put_conf, val, vname)
+  subroutine aot_out_val_real(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
       write(put_conf%outunit, fmt="(a,f0.9)", advance=adv_string) indent, val
     end if
 
-  end subroutine aot_put_val_real
+  end subroutine aot_out_val_real
 !******************************************************************************!
 
 
 !******************************************************************************!
 !>  Put double variables into the Lua script.
 !!
-  subroutine aot_put_val_double(put_conf, val, vname)
+  subroutine aot_out_val_double(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
       write(put_conf%outunit, fmt="(a,f0.9)", advance=adv_string) indent, val
     end if
 
-  end subroutine aot_put_val_double
+  end subroutine aot_out_val_double
 !******************************************************************************!
 
 
 !******************************************************************************!
 !>  Put logical variables into the Lua script.
 !!
-  subroutine aot_put_val_logical(put_conf, val, vname)
+  subroutine aot_out_val_logical(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
         &                                                    //trim(valstring)
     end if
 
-  end subroutine aot_put_val_logical
+  end subroutine aot_out_val_logical
 !******************************************************************************!
 
 
 !******************************************************************************!
 !>  Put string variables into the Lua script.
 !!
-  subroutine aot_put_val_string(put_conf, val, vname)
+  subroutine aot_out_val_string(put_conf, val, vname)
     !------------------------------------------------------------------------
     type(aot_out_type), intent(inout)  :: put_conf
     character(len=*), optional, intent(in) :: vname
         &  indent//"'"//trim(val)//"'"
     end if
 
-  end subroutine aot_put_val_string
+  end subroutine aot_out_val_string
 !******************************************************************************!
 
 

test/aotus_test.f90

 
   call aot_out_open(put_conf = dummyOut, filename = 'dummy.lua')
   call aot_out_open_table(dummyOut, 'screen')
-  call aot_put_val(dummyOut, 123, 'width')
-  call aot_put_val(dummyOut, 456, 'height')
+  call aot_out_val(dummyOut, 123, 'width')
+  call aot_out_val(dummyOut, 456, 'height')
 
   call aot_out_open_table(dummyOut, 'origin')
-  call aot_put_val(dummyOut, 100)
-  call aot_put_val(dummyOut, 0)
+  call aot_out_val(dummyOut, 100)
+  call aot_out_val(dummyOut, 0)
   call aot_out_close_table(dummyOut)
 
   call aot_out_close_table(dummyOut)