Multiple lines text in editor

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jackads
Posts: 6
Joined: Wed Aug 22, 2012 2:12 pm

Multiple lines text in editor

Post by jackads » Wed Jun 19, 2013 2:27 am

Hello guys,

I'm very beginner in LiveCode, I would like to code using multiple lines in the code editor, like in the image.

My "account does not have permission" to post link so I attach the image.

Have anyway I can do like that? To write long querys is very bad to use a single line, you know?

Thanks for the help, cheers! ;)
Attachments
multipleLineLiveCodeText.png

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Multiple lines text in editor

Post by Simon » Wed Jun 19, 2013 4:26 am

Hi Jack,
Use "\" (without the quotes) to start a new line.

I think that's what you mean.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Multiple lines text in editor

Post by dunbarx » Wed Jun 19, 2013 6:21 am

Simon nailed it. But be careful, though you can break a line in most places with the line continuation character, you cannot break a literal:

Do not do this:

Code: Select all

put "abcd\
efgh" into temp
Rather do this:

Code: Select all

put "abcd" &\
"efgh" into temp
Craig Newman

Adrian
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 79
Joined: Wed Jul 11, 2012 5:03 pm

Re: Multiple lines text in editor

Post by Adrian » Wed Jun 19, 2013 8:12 am

As an alternative you can make use of "after" with a variable.

For example:

put "select ................................" into tSmething
put "from ............................." after tSomething

In your particular case, you perhaps would end with:

return tSomething

jackads
Posts: 6
Joined: Wed Aug 22, 2012 2:12 pm

Re: Multiple lines text in editor

Post by jackads » Wed Jun 19, 2013 7:34 pm

Thanks guys,

I appreciated every answer, I don't want to use the

Code: Select all

put "select ................................" into tSmething
put "from ............................." after tSomething
way because it turns in a lot of code for big querys, only break the line with "&/" will be better for less code and to a better code read.

Thanks for the help, I love u all. ;)

Post Reply