--- loncom/html/adm/help/tex/Variables_in_Scripts.tex 2012/10/12 13:26:55 1.4 +++ loncom/html/adm/help/tex/Variables_in_Scripts.tex 2013/09/02 23:23:42 1.5 @@ -3,7 +3,9 @@ Variables can be used later in the same script. For instance, we can add another line below the \texttt{\$variable} line as such: -\$variable2~=~\$variable~+~2; +\begin{verbatim} +$variable2 = $variable+2; +\end{verbatim} Now there is a variable called \texttt{\$variable2} with the the number {}``5'' as its value. @@ -14,7 +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: -\$stringVar~=~{}``I~have~a~variable~with~the~value~\$variable.''; +\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''.