Skip to main content
Jhon Carlo
Inspiring
January 1, 2017
Answered

Is there a way to go to next line?

  • January 1, 2017
  • 2 replies
  • 661 views

If I have a long  line and I want to go to next line like this:

///////////////

function reportKeyDown(event: KeyboardEvent): void {

  trace("Key Pressed: " + String.fromCharCode(event.charCode) + " (key

code: " + event.keyCode + " character code: " + event.charCode + ")");

//////////

Is there a special char that it is possible to use?

Thanks and Happy New Year!!!

This topic has been closed for replies.
Correct answer kglad

i'm not sure what you're trying to do, but those of those are problematic.

and this would be ok

var MyList: Array = ["123", "456", "789\r",101112", "131415"];

if you wanted to add a carrage return after "789"

2 replies

Jhon Carlo
Inspiring
January 2, 2017

I'm sorry I misunderstood your suggestion which was right!

Thank you!!

kglad
Community Expert
Community Expert
January 2, 2017

you're welcome.

kglad
Community Expert
Community Expert
January 1, 2017

"\n" is the next line character.

"\r" is the carriage return.

Jhon Carlo
Inspiring
January 2, 2017

Thank you kglad!

I've tried e.g. this:

var MyList: Array = ["123", "456", "789" "\r"

"101112", "131415"];

or

var MyList: Array = ["123", "456", "789" \r

"101112", "131415"];

But doesn't work.

What I'm doing wrong?

Thanks.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
January 2, 2017

i'm not sure what you're trying to do, but those of those are problematic.

and this would be ok

var MyList: Array = ["123", "456", "789\r",101112", "131415"];

if you wanted to add a carrage return after "789"