gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
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 )

Check if arg is present and not equals val (double precision version)

Parameters
[in]argOptional double precision real argument
[in]valValue to compare
Returns
.true. if arg is present and not equals val beyond DP_EPS, .false. otherwise

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 )

Check if arg is present and not equals val (integer version)

Parameters
[in]argOptional integer argument
[in]valValue to compare
Returns
.true. if arg is present and not equals val, .false. otherwise

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 )

Check if arg is present and not equals val (single precision version)

Parameters
[in]argOptional single precision real argument
[in]valValue to compare
Returns
.true. if arg is present and not equals val beyond SP_EPS, .false. otherwise

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: