1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
%表題 MATH1下位基本数学処理ライブラリリファレンスマニュアル
%
%履歴
%\Drireki{
% 90/03/22 塩谷雅人
% 91/09/05 林祥介
% 91/12/11 塩谷雅人
% 92/03/14 塩谷雅人
% 92/04/13 塩谷雅人
% 92/04/22 林祥介 (4.1版)
% }
%
% \Dchapter{CHRLIB : 文字列の左詰め, 右詰め, 反転, 空白処理}
\Dchapterhead
\label{chrlib}
\section{概要}
文字列を扱う関数・サブルーチンパッケージ.
\vspace{1em}
以下でいう'空白'とは, NULL文字および空白文字
(ASCIIコード系においてはそれぞれ{\tt CHAR(0)}, {\tt CHAR(32)}に対応)
のことである.
\section{サブルーチンのリスト}
\begin{tabular}{lp{10cm}}
{\tt CLADJ(CHR)} & 文字列を左詰めする. \\
{\tt CRADJ(CHR)} & 文字列を右詰めする. \\
{\tt CRVRS(CHR)} & 文字列を反転する.
\end{tabular}
\section{関数のリスト}
\begin{tabular}{lp{10cm}}
{\tt LENB(C)}, {\tt LENY(C)} & 先行する空白の数を求める. \\
{\tt LENC(C)}, {\tt LENZ(C)} & 後続する空白を除いた文字数を求める.
\end{tabular}
\section{サブルーチンの説明}
\subsection{CLADJ/CRADJ}
\label{chrlib.sub.cladj}
\begin{enumerate}
\item 機能
\begin{quote}
文字列の左詰め/右詰めをおこなう.
\end{quote}
\item 呼び出し方法
\begin{quote}
{\tt CALL CLADJ(CHR)}\\
{\tt CALL CRADJ(CHR)}
\end{quote}
\item パラメーターの説明
\begin{quote}
\begin{tabular}{llp{10cm}}
{\tt CHR} & {\tt (C*(*))} & 操作をほどこす文字列.
入力パラメータでもあり出力パラメータでもある.
\end{tabular}
\end{quote}
\item 備考
\begin{enumerate}
\item 有効な文字列の長さは{\tt LEN(CHR)} ({\tt LEN}は
FORTRANの組み込み関数)で決まる.
\item 文字列の左詰め/右詰めとは,
先行/後続する空白の数だけ
文字列を左/右にシフトすることをいう.
シフトした後に残る領域には空白文字が埋められる.
\item {\tt CLADJ}, {\tt CRADJ}は途中の空白を詰めない.
\end{enumerate}
\end{enumerate}
\subsection{CRVRS}
\label{chrlib.sub.crvrs}
\begin{enumerate}
\item 機能
\begin{quote}
文字列を反転する.
\end{quote}
\item 呼び出し方法
\begin{quote}
{\tt CALL CRVRS(CHR)}
\end{quote}
\item パラメーターの説明
\begin{quote}
\begin{tabular}{llp{10cm}}
{\tt CHR} & {\tt (C*(*))} & 操作をほどこす文字列.
入力パラメータでもあり出力パラメータでもある.
\end{tabular}
\end{quote}
\item 備考
\begin{enumerate}
\item 有効な文字列の長さは{\tt LEN(CHR)} ({\tt LEN}は
FORTRANの組み込み関数)で決まる.
\end{enumerate}
\end{enumerate}
\section{関数の説明}
\subsection{LENB/LENY}
\label{chrlib.sub.lenb}
\begin{enumerate}
\item 機能
\begin{quote}
先行する空白の数を求める.
\end{quote}
\item 呼び出し方法
\begin{quote}
{\tt LENB(C)}\\
{\tt LENY(C)}
\end{quote}
\item パラメーターの説明
\begin{quote}
\begin{tabular}{llp{10cm}}
{\tt C} & {\tt (C*(*))} & 調べる文字列.\\
{\tt LENB}, {\tt LENY} & {\tt (I)} &
先行する空白の数を返す関数値.
\end{tabular}
\end{quote}
\item 備考
\begin{enumerate}
\item {\tt LENB}と{\tt LENY}の違いは,
{\tt C}がすべて空白からなるとき{\tt LENB}は
{\tt LEN(C)}--1を
返すのに対し, {\tt LENY}は{\tt LEN(C)}を返す
({\tt LEN}はFORTRANの組込み関数).
\end{enumerate}
\end{enumerate}
\subsection{LENC/LENZ}
\label{chrlib.sub.lenc}
\begin{enumerate}
\item 機能
\begin{quote}
後続する空白を除いた文字数を求める.
\end{quote}
\item 呼び出し方法
\begin{quote}
{\tt LENC(C)}\\
{\tt LENZ(C)}
\end{quote}
\item パラメーターの説明
\begin{quote}
\begin{tabular}{llp{10cm}}
{\tt C} & {\tt (C*(*))} & 調べる文字列.\\
{\tt LENC}, {\tt LENZ} & {\tt (I)} &
後続する空白を除いた文字数を返す関数値.
\end{tabular}
\end{quote}
\item 備考
\begin{enumerate}
\item {\tt LENC}と{\tt LENZ}の違いは,
{\tt C}がすべて空白からなるとき{\tt LENC}は1を返すのに対し,
{\tt LENZ}は0を返す.
\end{enumerate}
\end{enumerate}
|