--- loncom/html/adm/help/tex/Variables_in_Scripts.tex 2002/07/05 16:12:31 1.1
+++ loncom/html/adm/help/tex/Variables_in_Scripts.tex 2013/09/02 23:23:42 1.5
@@ -1,10 +1,11 @@
+\label{Variables_in_Scripts}
Variables can be used later in the same script. For instance, we can add
another line below the \texttt{\$variable} line as such:
-\begin{lyxcode}
-\$variable2~=~\$variable~+~2;
-\end{lyxcode}
+\begin{verbatim}
+$variable2 = $variable+2;
+\end{verbatim}
Now there is a variable called \texttt{\$variable2} with the the number {}``5''
as its value.
@@ -15,9 +16,9 @@ large number of ways of using variables
common way is to use normal double-quotes and just spell out the name of
the variable you want to use in the string, like this:
-\begin{lyxcode}
-\$stringVar~=~{}``I~have~a~variable~with~the~value~\$variable.''
-\end{lyxcode}
+\begin{verbatim}
+$stringVar = "I have a variable with the value $variable.";
+\end{verbatim}
This will put the string {}``I have a variable with the value 3.'' into
the variable named {}``stringVar''.