\chapter{BNK}

A following description shows a typical procedure to use BNK.
See Table\ref{tab:bnk_subroutine} in details.

\section{In FORTRAN}
\begin{enumerate}
\item First, declare ``BNK keyword''\footnote{
``BNK keyword'' is the name to be used to access each data.}
and size of data.

\begin{verbatim}
Call BNKdef(key, size)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword to be defined	\> (Character $\leq$ 24chars)\\
{\tt size}	\> Size of stored data in byte	\> (Integer $>$ 0)
\end {tabbing}

\item Put data into BNK

\begin{verbatim}
Call BNKput(key, size, array)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword			\> (Character $\leq$ 24chars)\\
{\tt size}	\> Size of data in byte		\> (Integer $>$ 0) \\
{\tt array}	\> Variable storing data to put	\> (type of data to be put)
\end {tabbing}

\item Get data from BNK

\begin{verbatim}
Call BNKget(key, size, used_size, array)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword			\> (Character $\leq$ 24chars)\\
{\tt size}	\> Size of data to get in byte	\> (Integer $>$ 0) \\
\smallskip \\
Output parameter \\
{\tt used\_size}\> Size of stored data in byte	\> (Integer $>$ 0) \\
{\tt array}	\> Variable to get data		\> (type of data to be got)
\end {tabbing}

\end{enumerate}

\begin{table}[hbt]
\begin{tabular}{ll} \hline
Subroutine name & function \\ \hline
{\tt BNKini} & initialize \\
{\tt BNKdef(key,size)}  & BNK key definition \\
{\tt BNKeqv(key1,size,key,start\_pointer)} &
assign key to predefined (key and data) \\
{\tt BNKput(key,size,array)} & put data \\
{\tt BNKget(key,size,used\_size,array)} & get data \\
{\tt BNKlst} & list key \\
{\tt BNKdmp(key,format)} & dump data to STDOUT \\
{\tt BNKnum(key,stored\_size,maxsize)} & get information \\
{\tt BNKclr} & clear of data \\ \hline 
\end{tabular}
\caption{Subroutines of BNK}
\label{tab:bnk_subroutine}
\end{table}


\section{In C}
\begin{enumerate}
\item First, declare ``BNK keyword''\footnote{
``BNK keyword'' is the name to be used to access each data.}
and size of data.

\begin{verbatim}
BNKDEF(key, size)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword to be defined	\> (char $\leq$ 24chars)\\
{\tt size}	\> Size of stored data in byte	\> (int $>$ 0)
\end {tabbing}

\item Put data into BNK

\begin{verbatim}
BNKPUT(key, size, ptr)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword			\> (char $\leq$ 24chars)\\
{\tt size}	\> Size of data in byte		\> (int $>$ 0) \\
{\tt ptr}	\> Pointer to variable storing data to put	\> (pointer)
\end {tabbing}

\item Get data from BNK

\begin{verbatim}
BNKGET(key, size, used_size, ptr)
\end{verbatim}
\begin{tabbing} mmmmmm \= mmmmmmmmmmmmmmmmmmmmmmmm \= m \kill
Input parameter \\
{\tt key}	\> BNK keyword			\> (char $\leq$ 24chars)\\
{\tt size}	\> Size of data to get in byte	\> (int $>$ 0) \\
\smallskip \\
Output parameter \\
{\tt used\_size}\> Size of stored data in byte	\> (int $>$ 0) \\
{\tt ptr}	\> Pointer to variable to get data	\> (pointer)
\end {tabbing}

\end{enumerate}

