gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
dc_present Module Reference

Judge optional control parameters. More...

Data Types

interface  present_and_eq
 
interface  present_and_ne
 
interface  present_select
 

Functions/Subroutines

logical function, public present_and_true (arg)
 
logical function, public present_and_false (arg)
 
logical function, public present_and_zero (arg)
 
logical function, public present_and_nonzero (arg)
 
logical function, public present_and_not_empty (arg)
 

Detailed Description

Judge optional control parameters.

Author
Youhei SASAKI, Yasuhiro MORIKAWA, Eizi TOYODA, Takeshi HORINOUCHI

Important

This file is generated from ../../../../src/dc_utils/dc_present.erb by ERB included Ruby 3.3.8. Please do not edit this file directly.

Function/Subroutine Documentation

◆ present_and_false()

logical function, public dc_present::present_and_false ( logical, intent(in), optional  arg)

Check if arg is present and false

Parameters
[in]argOptional logical argument
Returns
.true. if arg is present and .false., .false. otherwise

Definition at line 127 of file dc_present.f90.

128 logical :: result
129 logical, intent(in), optional :: arg
130 continue
131 if(present(arg)) then
132 if(arg) then
133 result=.false.
134 else
135 result=.true.
136 endif
137 else
138 result=.false.
139 endif

◆ present_and_nonzero()

logical function, public dc_present::present_and_nonzero ( integer, intent(in), optional  arg)

Check if arg is present and non-zero

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

Definition at line 177 of file dc_present.f90.

178 logical :: result
179 integer, intent(in), optional :: arg
180 continue
181 if(present(arg)) then
182 if(arg==0) then
183 result=.false.
184 else
185 result=.true.
186 endif
187 else
188 result=.false.
189 endif

◆ present_and_not_empty()

logical function, public dc_present::present_and_not_empty ( character(len=*), intent(in), optional  arg)

Check if arg is present and not empty string

Parameters
[in]argOptional character argument
Returns
.true. if arg is present and not an empty string, .false. otherwise

Definition at line 375 of file dc_present.f90.

376 logical :: result
377 character(len=*), intent(in), optional :: arg
378 continue
379 result = .false.
380 if( present(arg) .AND. (arg .ne. '')) result = .true.

◆ present_and_true()

logical function, public dc_present::present_and_true ( logical, intent(in), optional  arg)

Check if arg is present and true

Parameters
[in]argOptional logical argument
Returns
.true. if arg is present and .true., .false. otherwise

Definition at line 102 of file dc_present.f90.

103 logical :: result
104 logical, intent(in), optional :: arg
105 continue
106 if(present(arg)) then
107 if(arg) then
108 result=.true.
109 else
110 result=.false.
111 endif
112 else
113 result=.false.
114 endif

◆ present_and_zero()

logical function, public dc_present::present_and_zero ( integer, intent(in), optional  arg)

Check if arg is present and zero

Parameters
[in]argOptional integer argument
Returns
.true. if arg is present and equals zero, .false. otherwise

Definition at line 152 of file dc_present.f90.

153 logical :: result
154 integer, intent(in), optional :: arg
155 continue
156 if(present(arg)) then
157 if(arg==0) then
158 result=.true.
159 else
160 result=.false.
161 endif
162 else
163 result=.false.
164 endif