Fortraneries/BloubWorld/essai.f90

40 lines
825 B
Fortran
Raw Normal View History

2022-02-17 10:51:56 +01:00
program essai
2022-03-18 12:21:40 +01:00
use bloubspace
2022-02-17 10:51:56 +01:00
use mathstuff
implicit none
2022-03-18 12:21:40 +01:00
type(t_boundingbox) :: bbox
call load_boundingbox("WS/boundinboxes.dat", bbox, "cube ")
print *, bbox
! call test_random(20)
STOP ': BECAUSE JOB IS DONE'
! --------------------------------------------------------------
contains
subroutine test_random(nbre)
integer, intent(in) :: nbre
integer :: foo, bar
2022-02-17 10:51:56 +01:00
real :: quux
2022-02-17 14:10:15 +01:00
double precision :: somme
2022-02-17 10:51:56 +01:00
2022-03-18 12:21:40 +01:00
call init_random_seed() ! in module 'mathstuff'
2022-02-17 14:10:15 +01:00
somme = 0.0
2022-03-18 12:21:40 +01:00
do foo=1, nbre
2022-02-17 10:51:56 +01:00
quux = rand()
2022-02-17 14:10:15 +01:00
somme = somme + quux
2022-03-18 12:21:40 +01:00
bar = mod(irand(), 7)
print *, foo, quux, somme/foo, bar
2022-02-17 10:51:56 +01:00
enddo
2022-03-18 12:21:40 +01:00
end subroutine test_random
! --------------------------------------------------------------
2022-02-17 10:51:56 +01:00
2022-03-18 12:21:40 +01:00
end program