gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
sysdep Module Reference

システムに依存する手続きのインタフェースを提供します More...

Functions/Subroutines

subroutine, public abortprogram (message)
 プログラムを異常終了させます
 
integer function, public sysdepargcount ()
 コマンドライン引数の数を取得します
 
subroutine, public sysdepargget (index, val)
 コマンドライン引数を取得します
 
subroutine, public sysdepenvget (env, str)
 環境変数を取得します
 

Detailed Description

システムに依存する手続きのインタフェースを提供します

Author
Youhei SASAKI, Eizi TOYODA, Yasuhiro MORIKAWA

Function/Subroutine Documentation

◆ abortprogram()

subroutine, public sysdep::abortprogram ( character(len=*), intent(in), optional  message)

プログラムを異常終了させます


Definition at line 89 of file sysdep.f90.

90 use dc_types, only: stderr
91 implicit none
92 character(len=*), intent(in), optional :: message
93 continue
94 if (present(message)) write(stderr, *) trim(message)
95 call dc_f_abort()
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public stderr
標準エラー出力の装置番号
Definition dc_types.f90:122

References dc_types::stderr.

◆ sysdepargcount()

integer function, public sysdep::sysdepargcount

コマンドライン引数の数を取得します


Definition at line 113 of file sysdep.f90.

114 implicit none
115 sysdepargcount = command_argument_count()

References sysdepargcount().

Here is the call graph for this function:

◆ sysdepargget()

subroutine, public sysdep::sysdepargget ( integer, intent(in)  index,
character(len = *), intent(out)  val 
)

コマンドライン引数を取得します


Definition at line 137 of file sysdep.f90.

138 implicit none
139 integer, intent(in) :: index
140 character(len = *), intent(out) :: val
141 !
142 integer:: idx
143 integer:: argc
144 continue
145 argc = sysdepargcount()
146 if (index < 0) then
147 idx = argc + 1 + index
148 else
149 idx = index
150 endif
151 if (idx > argc) then
152 val = ''
153 else
154 call get_command_argument(index, val)
155 end if

References sysdepargcount().

Here is the call graph for this function:

◆ sysdepenvget()

subroutine, public sysdep::sysdepenvget ( character(len = *), intent(in)  env,
character(len = *), intent(out)  str 
)

環境変数を取得します


Definition at line 175 of file sysdep.f90.

176 character(len = *), intent(in) :: env
177 character(len = *), intent(out) :: str
178 call get_environment_variable(trim(adjustl(env)), str)