1 * Test org fortran file
7 integer, parameter :: i = 10
11 #+begin_src fortran :var N = 10
15 Define for preprocessed fortran
16 #+begin_src fortran :defines N 42
21 #+begin_src fortran :var s="word"
23 print *, 'size(s) = ', size(s)
26 #+begin_src fortran :var s=42.0
28 print *, 'kind(s) = ', kind(s)
33 print *, "output of ex program"
37 Should fail (TODO: add input variables for the case with explicit
39 #+begin_src fortran :var s="word"
41 print *, "output of ex program"
46 #+begin_src fortran :var s='(1.0 2.0 3.0)
55 #+begin_src fortran :var s=test_tbl
59 Fails to compile (TODO: error check in ob-fortran.el)
60 #+begin_src fortran :var s='(1 ())
64 Should fail to compile with gfortran
65 #+begin_src fortran :flags --std=f95 --pedantic-error
71 Pass parameters to the program
72 #+begin_src fortran :cmdline "23"
73 character(len=255) :: cmd