From: Barry Margolin <barmar@alum.mit.edu>
Subject: Re: grep can help?
Date: Thu, 22 Apr 2004 10:14:33 -0400 [thread overview]
Message-ID: <barmar-D5CD4E.10143322042004@comcast.ash.giganews.com> (raw)
In-Reply-To: c68a4v$b39$1@defalla.upc.es
In article <c68a4v$b39$1@defalla.upc.es>, FCC <fcc509@netscape.net>
wrote:
> Albert Reiner wrote:
> > Just to point out the obvious: This does not take into account
> > exclamation marks in string constants, and the standard also allows
> > you to write F90 in fixed format in which case you might use ! in
> > column 5 (?) for continuation lines. Of course it depends on your
> > code whether this is a problem; a general solution would need to parse
> > F90 in both formats.
> >
> > Albert.
>
> I see. I think your 2nd point is not an example of good programming, so
> I would not worry about it. But your 1st point needs to be taken care
> of: replace-regexp "\B!.*" " " and all the comments will be gone,
> respecting the ! inside the strings, as long as they don't come with a
> preceding whitespace. But if they do, this is again not a good practice,
> normally for example you write "Nice to see you!", but not "Nice to see
> you !".
>
> FCC.
That's true if the strings contain normal prose text. But suppose you
were writing a program that adds comments to programs. It's likely to
contain " ! " as a string.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
next prev parent reply other threads:[~2004-04-22 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-21 14:01 grep can help? FCC
2004-04-21 15:09 ` Glenn Morris
2004-04-21 16:33 ` FCC
2004-04-21 16:52 ` LEE Sau Dan
2004-04-21 17:59 ` FCC
2004-04-22 10:27 ` Albert Reiner
2004-04-22 11:23 ` FCC
2004-04-22 14:14 ` Barry Margolin [this message]
2004-04-22 15:51 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-D5CD4E.10143322042004@comcast.ash.giganews.com \
--to=barmar@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.