表示例
戻る
[
実行
]を押すと、「Okikaze Codeview」での表示例を見られます。
subroutine ATORGN(a,r) 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 real type number. c c Input variables: (name : type : explanation) c a : character type : number (e.g. '1.23'). c c Output variables: (name : type : explanation) c r : real type : number (e.g. 1.23). c c Required subroutines : none. c /----------------------------------- character*(*) a character*160 b,memo integer i,point,order,alen double precision d real r d=0.0D0 alen=len(a) b=' ' b(1:alen)=a 1 if (b(1:1).eq.' ') then memo=b b=memo(2:160) goto 1 end if do 10 i=1,160 if (b(i:i).eq.'.') then point=i goto 100 end if if (b(i:i).eq.' ') then b(i:i)='.' point=i goto 100 end if 10 continue 100 do 20 i=1,160 if (b(i:i).eq.'.') then goto 20 end if if (b(i:i).eq.' ') then goto 200 end if if (point-i.gt.0) then order=point-i-1 d=d+dble(ichar(b(i:i))-ichar('0'))*dble(10**order) else order=i-point d=d+dble(ichar(b(i:i))-ichar('0'))/dble(10**order) end if 20 continue 200 r=sngl(d) return end
. 実 行 .
リセット
. 実 行 .
リセット
表示
© 2009
TAKAGI-1