View Full Version : How to make a line break in a string?
Guest
1st October 2004, 11:26
How to make a line break in a string?
Tin2tin
Mug Funky
1st October 2004, 11:30
string("blah blah blah"+chr(13)+"blah blah second line")
chr(13) is the enter key...
esby
1st October 2004, 11:42
mmm "\n" does not work?
esby
Mug Funky
1st October 2004, 12:22
oh, we're talking about different things i think. a string variable can contain a line break if you use chr(13), but a script can contain them by simply going like
\this.
esby
1st October 2004, 12:34
"\n" syntax is supported by c++ too...
In delphi, you are forced to use #13#10 (or #10#13, I can't remember...)
Since the window coding ask for carriage return & line feed ...
esby
Guest
1st October 2004, 12:53
Thanks for you suggestions, but I can't get any of the solutions to work when I try to write either chr(13) or "\n" to a file using the writefile function in avisynth script:confused:
Guest
1st October 2004, 12:58
...but chr(10) works. Weird!
stickboy
1st October 2004, 18:56
Chr(13) (0xD) is a carriage return.
Chr(10) (0xA) is a newline. This is the one you want.
I don't think you need both when using WriteFile, because WriteFile probably opens the output file in text mode, and 0xA gets converted to the sequence 0xD 0xA automatically.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.