|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 --
Teamstudio announces the 2010 spotlight awards winners!
We had some extraordinary submissions for the 3rd annual Teamstudio Spotlight Awards, and choosing the winners was no easy task for our judges! Click here to find out who won, and to learn more about these remarkable applications and the genius developers behind them!
Tap here for more information. |
|
|
|
|
|
|
|
|
|
|