Updated script that can be controled by Nodejs web app

This commit is contained in:
mac OS
2024-11-25 12:24:18 +07:00
parent c440eda1f4
commit 8b0ab2bd3a
8662 changed files with 1803808 additions and 34 deletions

View File

@@ -0,0 +1,8 @@
module data
real(8) :: shift
contains
subroutine set_shift(in_shift)
real(8), intent(in) :: in_shift
shift = in_shift
end subroutine set_shift
end module data

View File

@@ -0,0 +1,6 @@
subroutine shift_a(dim_a, a)
use data, only: shift
integer, intent(in) :: dim_a
real(8), intent(inout), dimension(dim_a) :: a
a = a + shift
end subroutine shift_a

View File

@@ -0,0 +1,21 @@
module mod2
implicit none
private mod2_func1
contains
subroutine mod2_func1()
print*, "mod2_func1"
end subroutine mod2_func1
end module mod2
module mod1
implicit none
private :: mod1_func1
contains
subroutine mod1_func1()
print*, "mod1_func1"
end subroutine mod1_func1
end module mod1

View File

@@ -0,0 +1,21 @@
module mod2
implicit none
PUBLIC :: mod2_func1
contains
subroutine mod2_func1()
print*, "mod2_func1"
end subroutine mod2_func1
end module mod2
module mod1
implicit none
PUBLIC :: mod1_func1
contains
subroutine mod1_func1()
print*, "mod1_func1"
end subroutine mod1_func1
end module mod1

View File

@@ -0,0 +1,12 @@
module mod
integer :: i
integer :: x(4)
real, dimension(2,3) :: a
real, allocatable, dimension(:,:) :: b
contains
subroutine foo
integer :: k
k = 1
a(1,2) = a(1,2)+3
end subroutine foo
end module mod

View File

@@ -0,0 +1,20 @@
module mathops
implicit none
contains
function add(a, b) result(c)
integer, intent(in) :: a, b
integer :: c
c = a + b
end function add
end module mathops
module useops
use mathops, only: add
implicit none
contains
function sum_and_double(a, b) result(d)
integer, intent(in) :: a, b
integer :: d
d = 2 * add(a, b)
end function sum_and_double
end module useops