小编Zuo*_* Lu的帖子

Fortran子例程值关键字

我有一个FORTRAN文件"testValueKeyword.for"包含以下代码

  subroutine intersub2(x,y)
    integer, value ::  x
    integer y
    x = x + y
    y = x*y
  print *, 'in subroutine after changing: ', x, y
  end subroutine

  program testValueKeyword
    integer :: x = 10, y = 20
    print *, 'before calling: ', x, y
    call intersub(x, y)
    print *, 'after calling: ', x, y
    x = 10
    y = 20
    call intersub2(x, y)
  contains
  subroutine intersub(x,y)
    integer, value ::  x
    integer y
    x = x + y
    y = …
Run Code Online (Sandbox Code Playgroud)

fortran subroutine

2
推荐指数
1
解决办法
681
查看次数

标签 统计

fortran ×1

subroutine ×1