dc_string::stoi Interface Reference

Private Member Functions

integer function atoi_scalar (string, default)
 

Detailed Description

Definition at line 53 of file dc_string.f90.

Member Function/Subroutine Documentation

◆ atoi_scalar()

integer function dc_string::stoi::atoi_scalar ( character(len = *), intent(in)  string,
integer, intent(in), optional  default 
)
private

Definition at line 535 of file dc_string.f90.

535  !
536  ! string で与えられる文字型変数を、整数型変数にして返します。
537  ! もしも string が数値に変換できない場合、default が返ります。
538  ! default を指定しない場合は 0 が返ります。
539  !
540  character(len = *), intent(in):: string
541  integer, intent(in), optional:: default
542  integer:: ios
543 
544  continue
545 
546  read(unit=string, fmt="(i80)", iostat=ios) result
547  if (ios /= 0) then
548  if (present(default)) then
549  result = default
550  else
551  result = 0
552  endif
553  endif
type(gt_history), target, save, public default
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118

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