Fortraneries/GrafAnim/essai.f90

44 lines
987 B
Fortran

program essai
use usegenplot
implicit none
integer :: foo, bar
integer :: nbarg
integer :: numframe = 1
character(len=32) :: arg
! write(0, *) "------------ essai graf anim ---------------"
nbarg = IARGC()
if (nbarg .GT. 0) then
call GETARG(1, arg)
write (0, '(A40, A5)') "argument = ", arg
read (arg, *) numframe
endif
write(0, '(A40, I5)') "frame number =", numframe
call init_genplot("essai.genplot")
! call do_frame(7)
bar = (numframe * 20) - 160
do foo=20, 620, 40
call gplt_line(foo, 20, bar, 460)
call gplt_line(bar, 20, foo, 460)
enddo
contains !------------------------------------------
subroutine do_frame(color)
integer, intent(in) :: color
call gplt_line( 0, 0, 640, 0)
call gplt_line( 0, 480, 640, 480)
call gplt_line( 0, 0, 0, 480)
call gplt_line(640, 0, 640, 480)
end subroutine
end program