File: demo12.f90

package info (click to toggle)
fortran-cli2 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 25,856 kB
  • sloc: f90: 6,172; javascript: 3,423; makefile: 188; sh: 25
file content (19 lines) | stat: -rwxr-xr-x 465 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
program demo12
!!  @(#) using the convenience functions
use M_CLI2, only : set_args, set_mode, rget
implicit none
real :: x,  y,  z

   print *,'demo12: using the convenience functions'

!! ENABLE USING RESPONSE FILES
   call set_mode('response file')

   call set_args('-x 1.1 -y 2e3 -z -3.9 ')
   x = rget('x')
   y = rget('y')
   z = rget('z')
!! USE THE VALUES IN YOUR PROGRAM.
   write(*, '(*(g0:,1x))')'x=',x, 'y=',y, 'z=',z, 'SUM=',x+y+z

end program demo12