mk-srk-inc.sh

来自「gcc-fortran,linux使用fortran的编译软件。很好用的。」· Shell 代码 · 共 34 行

SH
34
字号
#!/bin/shcompile="$1"kinds=""possible_kinds="4 8 10 16"c=0for k in $possible_kinds; do  echo "  real (kind=$k) :: x" > tmp$$.f90  echo "  end" >> tmp$$.f90  if $compile -c tmp$$.f90 > /dev/null 2>&1; then    kinds="$kinds $k"    c=`expr $c + 1`  fi  rm -f tmp$$.*doneecho "  integer, parameter :: c = $c"echo "  type (real_info), parameter :: real_infos(c) = (/ &"i=0for k in $kinds; do  # echo -n is not portable  str="    real_info ($k, precision(0.0_$k), range(0.0_$k))"  i=`expr $i + 1`  if [ $i -lt $c ]; then    echo "$str, &"  else    echo "$str /)"  fidoneexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?