Hard Return in a String Variable

Hello,

Here’s another easy one, I think…

(If anyone has a good link for a LotusScript help site, please post this as well).

I have created an auto-reply agent. I’ve dimmed the ‘ReplyBody’ as a string variable, but now that HR has supplied me the text they want, there’s hard returns in it, so the string variable doesn’t work.

So - do I need to use a special character for hard returns? Do I need to dim it as a different data type?

thanks in advance!

Dan

Subject: Hard Return in a String Variable

If You want to have new lines in a string, then simply do like this:

Const LF = Chr$(10) + Chr$(13)

"My String will " + LF + "be broken when " + LF + “printed…”

The result will be (when printed):

My String will

be broken when

printed…

hth

Subject: RE: Hard Return in a String Variable

A constant can’t be a variable like Chr$(10) + Chr$(13)… either do it as a string variable, or set the constant to just one or the other value. That’s why you’re getting the illegal wotsit message.

HTH

Subject: RE: Hard Return in a String Variable

Thanks…I tried this and got:

Illegal constant expression for: LF

Anyway, if I insert + Chr$(10) + Chr$(13) + directly into the string (w/o the const) it works fine.

thanks!

Dan