gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
dc_present::present_and_ne Interface Reference

Public Member Functions

logical function present_and_ne_integer (arg, val)
logical function present_and_ne_real (arg, val)
logical function present_and_ne_double (arg, val)

Detailed Description

Definition at line 75 of file dc_present.f90.

Member Function/Subroutine Documentation

◆ present_and_ne_double()

logical function dc_present::present_and_ne::present_and_ne_double ( real(dp), intent(in), optional arg,
real(dp), intent(in) val )

arg が省略されておらず val と等しくないかどうかを判定(倍精度版)

Parameters
[in]arg省略可能な倍精度実数型引数
[in]val比較する値
Returns
arg が省略されておらず DP_EPS を超えて val と異なる場合は .true.、それ以外は .false.

Definition at line 348 of file dc_present.f90.

349 logical :: result
350 real(DP), intent(in), optional :: arg
351 real(DP), intent(in) :: val
352 continue
353 result = .false.
354 if(present(arg)) then
355 if(abs(arg - val) .gt. dp_eps) then
356 result=.true.
357 else
358 result=.false.
359 endif
360 else
361 result=.false.
362 endif

References dc_types::dp_eps.

◆ present_and_ne_integer()

logical function dc_present::present_and_ne::present_and_ne_integer ( integer, intent(in), optional arg,
integer, intent(in) val )

arg が省略されておらず val と等しくないかどうかを判定(整数版)

Parameters
[in]arg省略可能な整数型引数
[in]val比較する値
Returns
arg が省略されておらず val と等しくない場合は .true.、それ以外は .false.

Definition at line 290 of file dc_present.f90.

291 logical :: result
292 integer, intent(in), optional :: arg
293 integer, intent(in) :: val
294 continue
295 result = .false.
296 if(present(arg)) then
297 if(arg/=val) then
298 result=.true.
299 else
300 result=.false.
301 endif
302 else
303 result=.false.
304 endif

◆ present_and_ne_real()

logical function dc_present::present_and_ne::present_and_ne_real ( real(sp), intent(in), optional arg,
real(sp), intent(in) val )

arg が省略されておらず val と等しくないかどうかを判定(単精度版)

Parameters
[in]arg省略可能な単精度実数型引数
[in]val比較する値
Returns
arg が省略されておらず SP_EPS を超えて val と異なる場合は .true.、それ以外は .false.

Definition at line 319 of file dc_present.f90.

320 logical :: result
321 real(SP), intent(in), optional :: arg
322 real(SP), intent(in) :: val
323 continue
324 result = .false.
325 if(present(arg)) then
326 if( abs(arg - val) .gt. sp_eps ) then
327 result=.true.
328 else
329 result=.false.
330 endif
331 else
332 result=.false.
333 endif

References dc_types::sp_eps.


The documentation for this interface was generated from the following file: