HTP

Source code: ref/set.htp

Table of Contents
  htp.def
  macros.def
  htp.htt



<BLOCK syntax>
<SET macroname1="macrovalue1" [macroname2="macrovalue2" ...] [GLOBAL]>
</BLOCK>

<BLOCK synopsis>

<STRONG>SET</STRONG> creates a macro definition that can later be expanded
anywhere in the HTML document.  To create a macro:

<htpcode>
    <SET emailaddr="jnelson@crl.com">
</htpcode>
<P>
The macro "emailaddr" can then be expanded later.  The <A HREF="use.html">
USE</A> tag is used to expand the macro outside a tag (i.e., into the regular
text).  If the macro needs to be expanded inside a markup tag, use the
<A HREF="use.html">'$'</A> operator.
<P>
Multiple macros can be declared in a single markup tag, as the second
syntax line shows.
<P>
SET should only be used for a single line's worth of text.  Multi-line
macros can be defined with the <A HREF="block.html">BLOCK</A> tag.  The
<A HREF="block.html">BLOCK</A> tag is also useful if the macro contains
a quotation character and you don't want to fool around with special
escape characters.
<P>
Macros can be redefined by using another SET command with the same macro
name.  The prior definition will be destroyed, however.  Also, the macro
can be removed (destroyed) with the <A HREF="unset.html">UNSET</A> tag.

</BLOCK>

  page source
  htp project
  htp homepage
hosted by
SourceForge.net
HTML coding Powered by htp
htp on-line reference / http://htp.sourceforge.net/ref/
Authors: Jim Nelson, Jochen Hoenicke, Michael Möller.
Maintainers: Jochen Hoenicke.

Copyright © 1995-96 Jim Nelson.
Copyright © 2001-2003 Jochen Hoenicke.
Permission to reproduce and distribute this hypertext document granted according to terms described in the License section.

last updated Tue Feb 22, 2011