Alternate String Delimiters

Often a string literal in LotusScript will need to contain the quote character
("). Since this is the usual string delimiter, the embeded quote needs to be
handled correctly. Here are some different ways to display the string: Database
title is "Fish Sticks".
Dim session as New NotesSession
Dim db as NotesDatabase
Set db = session.CurrentDatabase

' 1) The escaped quote. Can be hard to see where
' the embedded quotes are and if there are enough of them.
Print "Database title is """ & db.Title & """."

' 2) The alternate delimiter. Allows embedded quotes
' and is easier to read with lees chance for error.
Print |Database title is "| & db.Title & |".|
' or, my favorite. . .
Print {Database title is "} & db.Title & {".}

' I like using braces as a string delimiter because the
' start ({) and end (}) characters are different. This, unlike
' the quote (") or pipe (|), makes it easy to see whrere
' the literal begins and ends. And embedded quotes
' are a snap to insert correctly.

Dig Deeper on LotusScript



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...