File:
[LON-CAPA] /
loncom /
html /
adm /
help /
tex /
Variables_in_Scripts.tex
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Fri Jul 5 16:12:31 2002 UTC (23 years ago) by
bowersj2
Branches:
MAIN
CVS tags:
HEAD
This commit implements the .tex-based online help system in LON-CAPA. It
may be necessary to manually run loncom/build/help_graphics_converter.pl
and doc/help/rebuildLabelHash.pl after a cvs update, and
loncapa_apache.conf may need to be manually copied to /etc. (The
loncapafiles.lpml has been updated.)
After merging this, the URL http://[loncapahost]/adm/help/Foils.hlp
should display a help file.
Also, some *very* out-of-date files have been removed from the /doc
directory.
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}
Now there is a variable called \texttt{\$variable2} with the the number {}``5''
as its value.
Variables can also be used in \emph{strings}\index{strings}, which are a
sequence of letters. The underlying language of the script, Perl, has a very
large number of ways of using variables in strings, but the easiest and most
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}
This will put the string {}``I have a variable with the value 3.'' into
the variable named {}``stringVar''.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>