ftnlf

Check-in [a969522261]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tweak test to check that L2F-generated module can be preloaded under arbitrary name.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a969522261612817413ad05ccdd9aa45d4779df5
User & Date: vadim 2019-01-23 09:05:03
Context
2019-06-02
22:10
Add Fortran call to create new Fortran/Lua array. check-in: e07e054ee1 user: vadim tags: trunk
2019-01-23
09:05
Tweak test to check that L2F-generated module can be preloaded under arbitrary name. check-in: a969522261 user: vadim tags: trunk
2019-01-22
09:38
Add mechanism for embedding Lua modules into Fortran. check-in: 729c82f64c user: vadim tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test.f90.

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    logical :: r
    real(8) :: fval
    real(8) :: fvals(10), arr_m(1), arr_o(10)
    
    ! Initialize
    ldr(1)%name='FX.Test'
    ldr(1)%f => ldr_fx_test
    ldr(2)%name='TestModule'
    ldr(2)%f => ldr_testmodule
    r = ftnlf_init('testdb.lua', ldr)
    if (.not. r) stop 99

    ! Simplified iface
    r = luafun_s('val1', [1.d0,-3.5d0], fval, tblname='tbl1')
    write (*,'(L2,1X,1PE11.4)') r, fval







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    logical :: r
    real(8) :: fval
    real(8) :: fvals(10), arr_m(1), arr_o(10)
    
    ! Initialize
    ldr(1)%name='FX.Test'
    ldr(1)%f => ldr_fx_test
    ldr(2)%name='FX.L2FTestModule'
    ldr(2)%f => ldr_testmodule
    r = ftnlf_init('testdb.lua', ldr)
    if (.not. r) stop 99

    ! Simplified iface
    r = luafun_s('val1', [1.d0,-3.5d0], fval, tblname='tbl1')
    write (*,'(L2,1X,1PE11.4)') r, fval

Changes to testdb.lua.

39
40
41
42
43
44
45
46
47
print('OUT: ')
for k = 1, #A do
   print(A[k])
end

end

local T2 = require('TestModule')
T2.printme()







|

39
40
41
42
43
44
45
46
47
print('OUT: ')
for k = 1, #A do
   print(A[k])
end

end

local T2 = require('FX.L2FTestModule')
T2.printme()