Home > Archive > Cobol > June 2005 > Full stop/period on a line by itself?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Full stop/period on a line by itself?
|
|
| Walter Murray 2005-06-09, 8:55 am |
| In another thread, "HeyBub" wrote:
[snip]
> Oh well, there's at least one shop "standard" that says "... and thou
shalt
> pitch it within and without with pitch and thou shalt not have within thy
> program a "GO TO" but thou shalt have within each paragraph one period.
Thou
> shalt not have two periods, nay even three, but one and one alone so that
> errors may not be multiplied and this one period that thou must have shall
> be among itself alone on a line..."
I like these commandments, with one modification.
Rather than putting the period all by itself on a line, I use a CONTINUE as
the last statement of the paragraph, and the period immediately follows the
CONTINUE on the same line. (Exceptions would be when the last statement is
a STOP RUN or EXIT PROGRAM, in which case the period immediately follows
that statement.)
That's my style, and I'm sticking to it.
I'm curious whether anyone else does this. I don't know that I've seen it
mentioned anywhere, but it works well for me.
Walter
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
| |
| Colin Campbell 2005-06-09, 8:55 am |
| Walter Murray wrote:
>In another thread, "HeyBub" wrote:
>
>[snip]
>
>shalt
>
>
>Thou
>
>
>
>
>I like these commandments, with one modification.
>
>Rather than putting the period all by itself on a line, I use a CONTINUE as
>the last statement of the paragraph, and the period immediately follows the
>CONTINUE on the same line. (Exceptions would be when the last statement is
>a STOP RUN or EXIT PROGRAM, in which case the period immediately follows
>that statement.)
>
>That's my style, and I'm sticking to it.
>
>I'm curious whether anyone else does this. I don't know that I've seen it
>mentioned anywhere, but it works well for me.
>
>Walter
>
>
>
Why bother typing 8 more characters? The period is required; the
CONTINUE is not.
I'm a fan of coding the period on a line by itself. I'm a BIG fan of
not coding periods after imperative statements. I'm also a fan of using
scope terminators in place of periods. That said....
I don't know why a shop would forbid other periods, though. Most shops
which are big enough to have a published standard are also big enough to
have (tens or hundreds of) thousands of old programs written before
their current standard was in place or enforced. Would a programmer be
expected to change working code when doing maintenance on a program, to
bring it "up to standard"?
The shop from which I recently retired is the only one I know of which
uses a program to enforce its standards. A good deal of discussion and
design was required to manage both new and old programs, as well as to
overcome the resistance and suspicions of the programming staff. But,
old programs get away with some things that new programs do not, such as
"GO TO para-EXIT", and mixing sections and paragraphs.
| |
| Pete Dashwood 2005-06-09, 8:55 am |
| I like your idea, Walter.
Currently, I place full stops on a line by themselves, and only ever
preceding a section or paragraph header. (I don't consider them to be part
of logic in modern COBOL.
Using CONTINUE with it would cetainly make it more visible.
Good idea...
Pete.
TOP POST no more below...
"Walter Murray" <wmurray@midtown.net> wrote in message
news:42a7b0ef$1_1@spool9-west.superfeed.net...
> In another thread, "HeyBub" wrote:
>
> [snip]
>
> shalt
thy[color=darkred]
> Thou
that[color=darkred]
shall[color=darkred]
>
>
> I like these commandments, with one modification.
>
> Rather than putting the period all by itself on a line, I use a CONTINUE
as
> the last statement of the paragraph, and the period immediately follows
the
> CONTINUE on the same line. (Exceptions would be when the last statement
is
> a STOP RUN or EXIT PROGRAM, in which case the period immediately follows
> that statement.)
>
> That's my style, and I'm sticking to it.
>
> I'm curious whether anyone else does this. I don't know that I've seen it
> mentioned anywhere, but it works well for me.
>
> Walter
>
>
>
> ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
=----
>
| |
| Joe Zitzelberger 2005-06-09, 3:55 pm |
| In article <42a7b0ef$1_1@spool9-west.superfeed.net>,
"Walter Murray" <wmurray@midtown.net> wrote:
> In another thread, "HeyBub" wrote:
>
> [snip]
>
> shalt
> Thou
>
>
> I like these commandments, with one modification.
>
> Rather than putting the period all by itself on a line, I use a CONTINUE as
> the last statement of the paragraph, and the period immediately follows the
> CONTINUE on the same line. (Exceptions would be when the last statement is
> a STOP RUN or EXIT PROGRAM, in which case the period immediately follows
> that statement.)
>
> That's my style, and I'm sticking to it.
>
> I'm curious whether anyone else does this. I don't know that I've seen it
> mentioned anywhere, but it works well for me.
>
> Walter
I have adopted something similar.
Since I am in an z/OS shop with little need for source portability I use
the "EXIT" statement prior to all full-stop periods.
I had to adopt it because the CICS v4.1 pre-compiler was greedy -- it
would consume any period following an "Exec CICS" command, resulting in
a possible error.
But I found it to be a nice way to make the period visible.
I suppose I should move to "CONTINUE." to work more in line with
standard Cobol.
| |
| Howard Brazee 2005-06-09, 3:55 pm |
|
On 9-Jun-2005, Joe Zitzelberger <joe_zitzelberger@nospam.com> wrote:
> Since I am in an z/OS shop with little need for source portability I use
> the "EXIT" statement prior to all full-stop periods.
>
> I had to adopt it because the CICS v4.1 pre-compiler was greedy -- it
> would consume any period following an "Exec CICS" command, resulting in
> a possible error.
>
> But I found it to be a nice way to make the period visible.
>
> I suppose I should move to "CONTINUE." to work more in line with
> standard Cobol.
With old programs that have EXIT statements, I will sometimes replace the EXIT
with CONTINUE. I'd rather re-write it without any drop through paragraphs
(which I abhor). But the CONTINUE gives me some easier options:
8000-GET-TAX-EXIT.
CONTINUE.
D DISPLAY 'DEBUGGING - REACHED 8000-GET-TAX-EXIT'.
| |
| Howard Brazee 2005-06-09, 3:55 pm |
|
On 8-Jun-2005, "Walter Murray" <wmurray@midtown.net> wrote:
> Rather than putting the period all by itself on a line, I use a CONTINUE as
> the last statement of the paragraph, and the period immediately follows the
> CONTINUE on the same line. (Exceptions would be when the last statement is
> a STOP RUN or EXIT PROGRAM, in which case the period immediately follows
> that statement.)
That wouldn't be against our shop's standards, unlike a period on a line by
itself.
| |
| Chuck Stevens 2005-06-09, 3:55 pm |
|
"Colin Campbell" <cmcampb@adelphia.net> wrote in message
news:roydnUBYzrihJTrfRVn-rQ@adelphia.com...
> Why bother typing 8 more characters? The period is required; the
> CONTINUE is not.
The period may or may not be obvious to the *human reader* when looking at a
screen, or even a listing. The CONTINUE on a line by itself helps draw
attention to the period, particularly when reasonable indentation rules are
followed that would identify the statement as "not subordinate".
-Chuck Stevens
| |
| Pete Dashwood 2005-06-10, 3:55 am |
|
"Howard Brazee" <howard@brazee.net> wrote in message
news:d89h67$kk8$1@peabody.colorado.edu...
>
> On 8-Jun-2005, "Walter Murray" <wmurray@midtown.net> wrote:
>
as[color=darkred]
the[color=darkred]
is[color=darkred]
>
> That wouldn't be against our shop's standards, unlike a period on a line
by
> itself.
If standards are intended to assist people, the more restrictive they are,
the less they achieve their goals.
If they are intended to establish authority, then the more restrictive they
are, the better.
I can't think of any reason why it would be 'forbidden' to put the period on
a line by itself, but I guess I'm just a pinko liberal... :-)
Pete.
| |
| Russell 2005-06-10, 3:55 am |
| "Pete Dashwood" <dashwood@enternet.co.nz> wrote in
news:3gs1j7Fe46koU1@individual.net:
>
> "Howard Brazee" <howard@brazee.net> wrote in message
> news:d89h67$kk8$1@peabody.colorado.edu...
> as
> the
> is
> by
>
> If standards are intended to assist people, the more restrictive they
> are, the less they achieve their goals.
>
> If they are intended to establish authority, then the more restrictive
> they are, the better.
>
> I can't think of any reason why it would be 'forbidden' to put the
> period on a line by itself, but I guess I'm just a pinko liberal...
> :-)
>
> Pete.
>
>
>
Just wait - your eyesight is bound to weaken sooner or later.
Windows in particular is famous for tiny periods.
Not to mention the lower case "L" (lima), uppercase "I" (india),
number "1" (one) problem in some fonts.
| |
| Richard 2005-06-10, 3:55 am |
| > If standards are intended to assist people, the more restrictive they are,
> the less they achieve their goals.
Standards aren't intended to assist the people who are writing
programs, they are imposed on those writing them to assist the people
who have to read and understand them later.
Thus the more restrictive they are, the more likely that the next
programmer's presumptions will be true and misunderstandings will be
less likely.
> I can't think of any reason why it would be 'forbidden' to put the period on
> a line by itself,
I can think of a reason, but it is not something that I would willingly
put up. Of course 'willingly' could be influenced by hourly rate.
| |
| Pete Dashwood 2005-06-10, 8:55 am |
|
"Russell" <rws0203nospam@comcast.net> wrote in message
news:Xns9670D2A77776Erws0203comcastnet@2
16.196.97.131...
> "Pete Dashwood" <dashwood@enternet.co.nz> wrote in
> news:3gs1j7Fe46koU1@individual.net:
>
>
> Just wait - your eyesight is bound to weaken sooner or later.
It has. That's WHY I would put the period where I can see it. (I'd really
rather not use them at all and I strive for this in code.)
>
> Windows in particular is famous for tiny periods.
> Not to mention the lower case "L" (lima), uppercase "I" (india),
> number "1" (one) problem in some fonts.
>
Yep. Agree completely.
Pete.
| |
| Howard Brazee 2005-06-10, 3:55 pm |
|
On 9-Jun-2005, "Pete Dashwood" <dashwood@enternet.co.nz> wrote:
> by
>
> If standards are intended to assist people, the more restrictive they are,
> the less they achieve their goals.
>
> If they are intended to establish authority, then the more restrictive they
> are, the better.
>
> I can't think of any reason why it would be 'forbidden' to put the period on
> a line by itself, but I guess I'm just a pinko liberal... :-)
My guess: As with most standards - someone got in trouble when he didn't see a
period, so he decided that they should be very visible. I've seen similar
standards against having commas - which can look like periods when the impact
printer is dirty.
|
|
|
|
|