Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Block comments ala Ray



2021-02-12 07:41:50 +0100, Roman Perepelitsa:
[...]
> And almost never like this:
> 
>   /*
>   Lorem ipsum
>   dolor sit amet
>   */
> 
> So block comments in my experience are most often used as if they were
> single-line comments.
[...]

Block comments are useful to comment out sections of code, as in

#if I_STILL_NEEDED_THIS

some
now dead
code

#endif /* I_STILL_NEEDED_THIS */

There's a POSIX sh equivalent for that though:

:||:<<'# some comment'

some
now dead
code

# some comment

(with the added benefit that you can just comment the :||: line
if you find that you want that code after all.

-- 
Stephane




Messages sorted by: Reverse Date, Date, Thread, Author