[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multilines strings "a la python"

From: Jose F. Morales
Subject: Re: multilines strings "a la python"
Date: Mon, 2 Feb 2015 06:31:00 +0100

On Sun, Feb 1, 2015 at 11:38 PM, Ulrich Neumerkel <address@hidden> wrote:
>> I add such text in Emacs with C-x r t \n\ Return
>> So spaces are added in lines that happen to be shorter.
>Yes, I do create a macro that adds \n\ to the end of the line and then I
>execute it n-times. But it's not nearly as easy as in

Putting \n\ directly at the end makes rather unreadable code.  But at
a fixed column position it is much better readable.  Look at the
following with a fixed-width font!

main_prog -->
    "                          \n\
main()                         \n\
   {  int i;                   \n\
      i = 3;                   \n\
      if (i > 2)               \n\
        whatever();            \n\
      exit(0);                 \n\
   }                           \n\

Unfortunately that text contains extra spaces which are not removed so that is not a solution in general. Would ISO allow using `...` as multiline string delimiter?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]