Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #55397

Re: Semicolon style?

From "HAA" <someone@microsoft.com>
Newsgroups comp.lang.forth
Subject Re: Semicolon style?
Date 2017-03-04 11:42 +1100
Organization Aioe.org NNTP Server
Message-ID <o9d2dq$19a1$1@gioia.aioe.org> (permalink)
References <8546c533-ec18-4ec1-896e-2a1eb76c609e@googlegroups.com><2017Mar3.100333@mips.complang.tuwien.ac.at> <o9c70g$a0b$3@dont-email.me><2017Mar3.183432@mips.complang.tuwien.ac.at> <o9cq7t$h7c$2@dont-email.me>

Show all headers | View raw


rickman wrote:
> On 3/3/2017 12:34 PM, Anton Ertl wrote:
> > rickman <gnuarm@gmail.com> writes:
> >> On 3/3/2017 4:03 AM, Anton Ertl wrote:
> >>> Mark Wills <markwills1970@gmail.com> writes:
> >>>> I can't decide which I prefer:
> >>>>
> >>>> Trailing semicolon, like this:
> >>>>
> >>>> : contractCount ( addr -- n )
> >>>>  \ given the address of the variable, return the
> >>>>  \ number of contracts associated with it.
> >>>>  3 cells + @ ;
> >>>>
> >>>> Or on it's own line in column 0:
> >>>>
> >>>> : contractCount ( addr -- n )
> >>>>  \ given the address of the variable, return the
> >>>>  \ number of contracts associated with it.
> >>>>  3 cells + @
> >>>> ;
> >>>>
> >>>> What say you?
> >>>
> >>> I normally prefer the former style, but the latter has the advantage
> >>> of making it easier to add or remove a line right before the ";",
> >>> e.g., during debugging.
> >>
> >> What?  How is that easier to edit?
> >
> > |easier to add or remove a line right before the ";"
> >
> > At least if you have an editor with line-oriented commands.
>
> I don't see how it is easier.  Position the cursor before the ";" and
> insert a line... in either case.
>
> In any event it doesn't matter.  We each have our preferences.

If your preference is to use trailing comments then it becomes more
practical to have ";" on a line of its own.  An example is Mitch Bradley's
Open Firmware.



Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Semicolon style? Mark Wills <markwills1970@gmail.com> - 2017-03-01 08:57 -0800
  Re: Semicolon style? crc <charles.childers@gmail.com> - 2017-03-01 10:27 -0800
  Re: Semicolon style? peter.m.falth@gmail.com - 2017-03-01 10:39 -0800
    Re: Semicolon style? minforth@arcor.de - 2017-03-02 08:38 -0800
      Re: Semicolon style? rickman <gnuarm@gmail.com> - 2017-03-02 12:31 -0500
        Re: Semicolon style? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-02 22:12 -0800
          Re: Semicolon style? Julian Fondren <julian.fondren@gmail.com> - 2017-03-02 22:25 -0800
            Re: Semicolon style? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-03 08:56 +0000
        Re: Semicolon style? minforth@arcor.de - 2017-03-03 03:42 -0800
          Re: Semicolon style? rickman <gnuarm@gmail.com> - 2017-03-03 11:53 -0500
  Re: Semicolon style? "HAA" <someone@microsoft.com> - 2017-03-02 12:24 +1100
  Re: Semicolon style? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-03 09:03 +0000
    Re: Semicolon style? rickman <gnuarm@gmail.com> - 2017-03-03 11:54 -0500
      Re: Semicolon style? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-03 17:34 +0000
        Re: Semicolon style? rickman <gnuarm@gmail.com> - 2017-03-03 17:22 -0500
          Re: Semicolon style? "HAA" <someone@microsoft.com> - 2017-03-04 11:42 +1100
  Re: Semicolon style? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2017-03-03 15:12 +0000

csiph-web