File:  [LON-CAPA] / loncom / html / adm / help / tex / Numerical_Response_Simple_Example.tex
Revision 1.2: download - view: text, annotated - select for diffs
Thu Jul 18 15:52:27 2002 UTC (22 years, 1 month ago) by bowersj2
Branches: MAIN
CVS tags: version_1_3_X, version_1_3_3, version_1_3_2, version_1_3_1, version_1_3_0, version_1_2_X, version_1_2_99_1, version_1_2_99_0, version_1_2_1, version_1_2_0, version_1_1_X, version_1_1_99_5, version_1_1_99_4, version_1_1_99_3, version_1_1_99_2, version_1_1_99_1, version_1_1_99_0, version_1_1_3, version_1_1_2, version_1_1_1, version_1_1_0, version_1_0_99_3, version_1_0_99_2, version_1_0_99_1, version_1_0_99, version_1_0_3, version_1_0_2, version_1_0_1, version_1_0_0, version_0_99_5, version_0_99_4, version_0_99_3, version_0_99_2, version_0_99_1, version_0_99_0, version_0_6_2, version_0_6, version_0_5_1, version_0_5, conference_2003, HEAD
Convenince labels added to the top of each file to assist in creating
index-type help files for things like the XML editor screen (where
there's nothing to hook help to).

    1: \label{Numerical_Response_Simple_Example}
    2: 
    3: A script consists of several \textbf{statements}, separated by \textbf{semi-colons}.
    4: A \textbf{statement\index{statement}} is the smallest kind of instruction
    5: to the computer. Most problems will be built from several statements. 
    6: 
    7: A script can contain \textbf{comments}, which are not interpreted as statements
    8: by the computer. Comments start with \textbf{\#}, and go to the end of that
    9: line. Thus, if a line starts with \#, the whole line is ignored. Comments
   10: can also begin in the middle of a line. It is a good idea to comment more
   11: complicated scripts, as it can be very difficult to read a large script and
   12: figure out what it does. It is a \emph{very} good idea to adopt some sort
   13: of commenting standard, especially if you are working in a group or you believe
   14: other people may use your problems in the future.
   15: 
   16: \begin{itemize}
   17: \item One of the simplest statements in LON-CAPA is a \textbf{variable assignment}.
   18: A \textbf{variable} can hold any value in it. The variable name must start
   19: with a \textbf{\$}. In the \textbf{Script}, you need to assign to variables
   20: before you use them. Put this program into the \textbf{Script} field of the
   21: Numerical Response:
   22: 
   23: \begin{lyxcode}
   24: \$variable~=~3;
   25: \end{lyxcode}
   26: This creates a variable named \textbf{variable} and assigns it the value
   27: of {}``3''. That's one statement.
   28: 
   29: \end{itemize}
   30: Variable names are \emph{case sensitive}, must start with a letter, and can
   31: only consist of letters, numbers, and underscores. Variable names can be
   32: as long as you want. 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>