خرید بک لینک

Vote count: 0

Is there a way to escape a newline in a string? I try to break my lines of code at about 80 characters, but sometimes I write messages which are longer than those lines. Is there a way to just escape the newline? I don't want to paste multiple strings into a single one.

cat(sprintf(
  '%s Re-quantify was set to "True"! Please reanalyse data with correct settings and start the script again.n',
  date()))

And if I add new lines, the message is also printed in two lines

cat(sprintf(
  '%s Re-quantify was set to "True"! Please reanalyse data 
with correct settings and start the script again.n',
  date()))

I am aware that paste solves my problem, but the code is harder to read I think.

cat(sprintf(
  paste('%s Re-quantify was set to "True"! Please reanalyse data', 
        'with correct settings and start the script again.n'),
  date()))

So is there something I can do inline? Just using to escape the newline didn't work.

asked 37 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 25 فروردين 1395 ساعت: 21:33

صفحه بندی