help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How can I add space between operands and operator in emacs?


From: B.T. Raven
Subject: Re: How can I add space between operands and operator in emacs?
Date: Sat, 26 Feb 2005 15:56:35 -0600

"Zhou Lei" <dark_eaglet@hotmail.com> wrote in message
87wtsw5a72.fsf@hotmail.com">news:87wtsw5a72.fsf@hotmail.com...
>
> Hi friends, how can I add a space between operands and operator, like
this: from
> "a=c+++3;" to "a = c++ + 3;"? I use GNU Indent for C code, but GNU
Indent cannot
> deal with something for C++. What should I do? Thanks.

M-% +++ ret ++ + ret !

Since addition is a commutative operation you could have written a = 3 +
c++;
What is the operator precedence of inc and binary +?

Here's an example of something even more perverse:

char*f="char*f=%c%s%c;main()
     {printf(f,34,f,34,10);}%c";
     main(){printf(f,34,f,34,10);}


or, more on topic:

((lambda (x)
       (list x (list (quote quote) x)))
      (quote
         (lambda (x)
           (list x (list (quote quote) x)))))

Both programs print themselves and were called quines by Douglas
Hofstadter, after the logician:

http://www.nyx.net/~gthompso/quine.htm




reply via email to

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