You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Ed Yu <ek...@asgnet.psc.sc.edu> on 2002/07/10 22:19:30 UTC

Escaping of the # character in user guide?

I posted this yesterday in the velocity-users list and get no response.
There following situation needs to be mentioned in the users docs since
it is not very apparent to new users:

<html>

#macro (m)
    In macro \#m <br>
#end

#macro(m1 $arg)
    In macro \#m1 with argument $arg <br>
#end

  <body>
    #m1("This will error out, #m")
    #m1("This will also error out, \#m")

    #set ($poundSign = "\#") ## This will error out
    #set ($poundChar = "#")
    #m1("This is ok, ${poundChar}m")
  </body>

</html>

What do you all think?

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ed Yu, IBM Certified Specialist - AIX System Administrator
Information Technology Manager,
University of South Carolina,
Advanced Solutions Group, Physics Dept.,
Columbia, SC 29208
Office (803)777-8831, FAX (803)777-8833, Email ekyu@asgnet.psc.sc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>