File: function-template.tex

package info (click to toggle)
alberta 3.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,176 kB
  • sloc: ansic: 135,836; cpp: 6,601; makefile: 2,801; sh: 333; fortran: 180; lisp: 177; xml: 30
file content (56 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download
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
%%
%% LaTeX code fragment, a template for documenting a function
%%
\subsubsection{The \code{foo\_bar()} function}
\label{S:blah_fct}
%%
\fdx{foo_bar()@{\code{foo\_bar()}}|(}
\idx{major topic!foo_bar()@{\code{foo\_bar()}}|(}

\begin{description}
\item[Prototype] ~\hfill
%%
\bv\begin{lstlisting}
typedef struct foo_result
{
  int blah;
} FOO_RESULT;

FOO_RESULT *foo_bar(ARGUMENT_TYPE *arg, bool better_not);
\end{lstlisting}\ev

\item[Synopsis] ~\hfill

\bv\begin{lstlisting}[basicstyle=\normalsize]
foo_result = foo_bar(arg, better_not);
\end{lstlisting}\ev
\item[Description] ~\hfill

  Depending on the value of \code{better\_not} do funny computations
  and store the result in a \code{FOO\_RESULT} structure, or don't do
  those funny computations.
\item[Parameters]~\hfill
  \begin{descr}
  \hyperitem{foo_bar:arg}{arg} Blah blah and so on.
    %% 
  \hyperitem{foo_bar:better_not}{better\_not} A boolean value, if
    \code{true} do funny computations, otherwise don't.
    %%
  \end{descr}
\item[Return Value] ~\hfill
  
  A pointer to a storage area for the results, or \nil if
  \hyperlink{foo_bar:better_not}{\code{better\_not}} is \code{false}.
\item[Examples] ~\hfill

  \dots are not available. Grin.
\end{description}
%%
\fdx{foo_bar()@{\code{foo\_bar()}}|)}
\idx{major topic!foo_bar()@{\code{foo\_bar()}}|)}
%%

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "alberta-man"
%%% End: