|
|
|
|
|
|
|
|
|
|
|
|
|
|
PROGRAMMING POWER
Storing text in LotusScript
By Tony Patton
Here's a tip for storing a large amount of text in LotusScript.
There are many times when I need to store large amounts of text, usually multiple lines, in LotusScript code. One good example is printing HTML, where I store the necessary code in variables, using it as needed.
Enclosing the text in either curly braces {}, or the pipe symbol, provides an easy solution. They allow me to store large amounts of multi-line text and preserve all line feeds. Here's a small example where I use the technique to store the HTML for a footer.
Const FOOTER={
<!- Begin Footer ->
All rights reserved<BR>
<a href="copyright.html">
@2005</a>
Company Name
<!- End Footer ->
}
|
One great aspect of this approach is the preservation of new line characters, it improves the readability of your HTML code as well as your LotusScript code.
DominoPower Contributing Editor Tony Patton is a Domino enthusiast with plenty of experience in Domino, Java, XML, and any other hot buzzword. He has written two books (Practical LotusScript and Domino Development With Java) and is a long-suffering Philadelphia sports fan. Drop him a line at aspatton@bellsouth.net.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|