Hi, I need to be able to put something like a text below into a variable
"My name is Val.
I live in New Orleans.
I love seafood."
I know how to put a single line text into a variable - put "My name is Val" into myVar1. I am a little bit confused about how to do the same thing with a multi line text (see above).
Any help is very appreciated.
Val
Put large text into a variable
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Put large text into a variable
Hi Val,
welcome to the forum!
Just add a RETURN (or shorter CR) to your strings!
...
put "My name is Val." & CR & CR & "I live in New Orleans." & CR & CR & "I love seafood." into myVar
answer myVar
...
Will give:
My name is Val.
I live in New Orleans.
I love seafood.
Best
Klaus
P.S.
check these stacks, great learning resources!
http://www.runrev.com/developers/lesson ... nferences/
welcome to the forum!

Just add a RETURN (or shorter CR) to your strings!
...
put "My name is Val." & CR & CR & "I live in New Orleans." & CR & CR & "I love seafood." into myVar
answer myVar
...
Will give:
My name is Val.
I live in New Orleans.
I love seafood.
Best
Klaus
P.S.
check these stacks, great learning resources!
http://www.runrev.com/developers/lesson ... nferences/
Re: Put large text into a variable
Hi, Klaus,
Thank you for the help. One more related question - if this line becomes too long, how can I start a new line without breaking the code?
Thank you.
Val
Thank you for the help. One more related question - if this line becomes too long, how can I start a new line without breaking the code?
Thank you.
Val
Re: Put large text into a variable
Hi Val,
you mean in the script editor?
You can use a BACKSLASH as a not_breaking_the_code_new_line
Like this:
will result in ONE line in the variable.
You get the picture!
Best
Klaus
you mean in the script editor?
You can use a BACKSLASH as a not_breaking_the_code_new_line

Like this:
Code: Select all
...
put "This is a very very long line that will surely make reading extremely difficult and " & \
"is a pain to script in this script editor, but there is the handy BACKSLASH!" into myVar
...
You get the picture!
Best
Klaus
Re: Put large text into a variable
Thank you, Klaus!