## "Fossies" - the Fresh Open Source Software Archive

### Member "gretl-2020e/doc/tex/hp-reference.tex" (2 Oct 2015, 2161 Bytes) of package /linux/misc/gretl-2020e.tar.xz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1
2 \chapter{Rules regarding white space}
3
4 Programming languages differ in their rules regarding the use of white
5 space in a program. Here we set out the rules in hansl.  The rules
6 differ somewhat between \textit{commands} on the one hand and
7 \textit{function calls} plus \textit{assignment} on the other.
8
9 \section{White space in commands}
10
11 Hansl commands are structured as follows: first comes a
12 \textit{command word} (e.g.\ \texttt{ols}, \texttt{summary}); then
13 come zero or more \textit{arguments} (often the names of series); then
14 come zero or more \textit{options} (some of which may take
15 parameters). The relevant rules are:
16 \begin{enumerate}
17 \item The individual elements just mentioned must always be separated
18   by at least one space, and where one space is required you are free
19   to insert as many as you like.
20 \item Whenever a parameter is supplied with an option flag, the
21   parameter must be attached to the flag with an equals sign, with
22   \textit{no} intervening space:
23 \begin{code}
24 ols y 0 x --cluster=clustvar  # correct
25 ols y 0 x --cluster =clustvar # broken!
26 \end{code}
27 \end{enumerate}
28
29 \section{Spaces in function calls and assignment}
30
31 For the most part, white space in function calls and assignment is not
32 significant; it can be inserted or not at will. For example, in the
33 following sets of statements each member is equally acceptable
34 syntactically (though some are ugly!):
35 \begin{code}
36 # set 1
37 y = sqrt(x)
38 y=sqrt(x)
39 # set 2
40 c = cov(y1, y2)
41 c=cov(y1,y2)
42 c  = cov(y1 , y2)
43 \end{code}
44
45 However, please note these exceptions:
46 \begin{enumerate}
47 \item When an assignment starts with a type keyword such as
48   \texttt{series} or \texttt{matrix}, this must be separated from what
49   follows by at least one space, as in
50 \begin{code}
51 series y = normal() # or: series y=normal()
52 \end{code}
53 \item In a function call, the opening parenthesis that marks the start
54   of the argument list must be attached to the name of the function
55   without intervening space:
56 \begin{code}
57 c = cov(y1, y2)  # correct
58 c = cov (y1, y2) # broken!
59 \end{code}
60 \end{enumerate}
61
62 \label{LastPage}
63
64 %%% Local Variables:
65 %%% mode: latex
66 %%% TeX-master: "hansl-primer"
67 %%% End: