以下は、人間用のデータではありません。
ALGGN ! 文字型変数に記憶されているバイト数を出力
* chara_nowpub.f 5
* Src code start
subroutine ALGGN(a,lg) ! 文字型変数に記憶されているバイト数を出力
c -----------------------------------
c You can freely use, copy, modify and redistribute this subroutine.
c This subroutine comes with absolutely no warranty.
c
c Copyright (C) 2006 TAKAGI-1
c
c Author : TAKAGI-1
c Date : 2006/ 2/18
c Modification:
c
c In this subroutine,
c count characters of the text.
c
c Input variables: (name : type : explanation)
c a : character type : text (e.g. 'abc').
c
c Output variables: (name : type : explanation)
c alg : integer type : byte number of the text (e.g. 3)
c
c Required subroutines : none.
c /-----------------------------------
character a*(*)
integer lg,j,k,along
along = len(a)
if (a.eq.' ') then
lg=0
goto 100
end if
do 5 j=along,30,-30
if (a(j-29:j).ne.
*' ') then
goto 8
end if
5 continue
8 do 10 k=j,1,-1
if (a(k:k).ne.' ') then
goto 20
end if
10 continue
20 lg=k
100 return
end
© TAKAGI-1