以下は、人間用のデータではありません。
ATOIGN ! 文字型アラビア数字列を整数型データに変換 (例: '123' → 123)
* chara_nowpub.f 3
* Src code start
subroutine ATOIGN(aa,ii) ! 文字型アラビア数字列を整数型データに変換 (例: '123' → 123)
c -----------------------------------
c You can freely use, copy, modify and redistribute this subroutine.
c This subroutine comes with absolutely no warranty.
c
c Copyright (C) 2007 TAKAGI-1
c
c Author : TAKAGI-1
c Date : 2007/ 1/ 1
c Modification:
c
c In this subroutine,
c change the chracter type number to the integer type number.
c
c Input variables: (name : type : explanation)
c aa : character type : number (e.g. '123').
c
c Output variables: (name : type : explanation)
c ii : integer type : number (e.g. 123).
c
c Required subroutines : ATORGN (in the library 'Chara.f'). ! 文字型アラビア数字列を実数型データに変換 (例: '1.23' → 1.23)
c /-----------------------------------
character aa*(*)
integer ii
character a*160
integer alen
real r
a=' '
alen=len(aa)
a(1:alen)=aa
call ATORGN(a,r) ! 文字型アラビア数字列を実数型データに変換 (例: '1.23' → 1.23)
ii=nint(r)
return
end
© TAKAGI-1