PDA

View Full Version : long lines



charlie
October 14th, 2003, 11:55 AM
I may have posted this before, but I have searched the forums, and elswhere.
Can anyone tell me a way to break up long lines of code, in VB it's possible to continue a line of code, on the next physical line with an _ (underscore).
Can you do this in flash?

jingman
October 14th, 2003, 01:33 PM
You don't need anything, just put a semicolon in when you're done with a statement, for example:


a
=
6;
trace(a);

charlie
October 15th, 2003, 04:14 AM
thanks for the reply, I realise that this method works, but if you then press autoformat all the code is placed on one physical line. I was hoping there was a way of breaking up the lines of code that would work even if the code was autoformatted.

senocular
October 15th, 2003, 09:03 AM
it depends what your code is. Most things can be logically sperated into multiple lines. Long strings for instance can be divided in assignment.


str = "it depends what your code is. Most things can ";
str += "be logically sperated into multiple lines. Long ";
str += "strings for instance can be divided in assignment.";

as well as just about any other expression. Just a matter of structure.