unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: fortran indentation bug?
Date: Tue, 10 Jun 2008 19:37:34 -0400	[thread overview]
Message-ID: <218wxcrhdt.fsf@fencepost.gnu.org> (raw)
In-Reply-To: buor6b5lt1s.fsf@dhapc248.dev.necel.com

Miles Bader wrote:

> The following program fragment is indented by fortran-mode, with 
> `fortran-check-all-num-for-matching-do' set to t.
>
> Isn't the statement on the numbered line part of the DO body, and so
> should be indented along with the body?
>
>       DO 110 J=1,NZ
>          DTEMP=GRID(IEXT(J))
>          DTEMP=DCOS(DTEMP*PI2)
>  110  X(J)=DTEMP

The numbered statement is part of the loop body, yes.

I guess fortran-mode indents under the assumption that most people
using numbered DO loops will use CONTINUE (as a proxy for END DO)
rather than an actual code statement to close the loop, in which case
the current indentation is the normal one people tend to use.

I might try and change it to do a different thing for non-CONTINUEs,
but it's a very old format (insert Fortran joke of your choice here).
END DO has been around since 1978.




  reply	other threads:[~2008-06-10 23:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  6:09 fortran indentation bug? Miles Bader
2008-06-10 23:37 ` Glenn Morris [this message]
2008-06-11  0:06   ` Miles Bader
2008-06-11  1:18     ` Glenn Morris

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=218wxcrhdt.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).