Forums

line wrapping

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

line wrapping

Postby DelphiGuy » Mon Jan 14, 2013 6:28 pm

would someone please give me a heads up as to how to wrap long lines of code to the next line? can't find it on the site. thanks.
DelphiGuy
 
Posts: 116

Re: line wrapping

Postby nerdzero » Mon Jan 14, 2013 6:35 pm

You can do it with an underscore _
character.

Check the bottom of this how-to page: http://cobra-language.com/how-to/WriteBasicSyntax/

I believe implicit line wraps also happen at binary operators as well now (like +, *, etc).
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: line wrapping

Postby DelphiGuy » Mon Jan 14, 2013 7:09 pm

ah, thanks. i was searching for the wrong nomenclature. apparently it's called "line continuation".
DelphiGuy
 
Posts: 116

Re: line wrapping

Postby Charles » Tue Jan 15, 2013 5:58 pm

And for the benefit of anyone skimming this thread, you can implicitly continue lines when inside a method call or collection literal (list, dictionary, set, array).
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 33 guests

cron