From: Richard on
On Aug 13, 11:18 pm, foodman <foodman...(a)aol.com> wrote:
> > most editors fail to distinguish adequately between '.' and ','
> > leading to one being mistaken for the other.
>
> Can you specify which editors have this problem and provide
> examples of how they "fail to distinguish adequately" between the two?
>
> Since you say 'most editors' can you tell us which ones do not
> have this problem?

I do have edit programs which will highlight full stops, or other
special characters, eg make the background red for a full stop,
alternately green/red for tabs, black for spurious control characters
while the main text has a blue background. Reserved words are shown in
yellow while user words are white, comments are gray, text literals
light blue.

This adequately distinguishes between various elements of the code.

Most text editors (programs) that I have tried do not do this
highlighting for punctuation on COBOL files relying on the font to
distinguish between the full stop and the comma. This is not adequate
for my needs.

As commas are entirely useless in terms of COBOL syntax I have found
it best to do a bulk find and replace to a space in the procedure
division, or indeed everywhere except text literals, in any programs
that come to me from outside.

I see that the code has a full stop or a comma on the end of each line
where that is possible. Now perhaps it makes you feel unfulfilled to
see a line without some form of punctuation, perhaps when you indent
code you diligently replace all the full stops with commas and vice
versa.

To me that is time wasting when the only full stops that are necessary
are after the labels and at the end of each paragraph. Commas are
never required.

Still, as the saying goes: If you don't know what you are doing, do it
neatly.

(where 'neatly' is entirely a subjective issue).

> Which editor do you use?
>
> BTW that routine was not written by me but by an employee of mine.
>
> thanks

From: Howard Brazee on
On Fri, 13 Aug 2010 12:27:32 -0700 (PDT), Richard
<riplin(a)Azonic.co.nz> wrote:

>As commas are entirely useless in terms of COBOL syntax I have found
>it best to do a bulk find and replace to a space in the procedure
>division, or indeed everywhere except text literals, in any programs
>that come to me from outside.

Since text literals can be in the procedure division, I expect this
procedure may cause more errors than it avoids.

And in working storage, commas may be significant even when they are
not in text literals.

(All of this is assuming commas aren't decimal points).

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: Richard on
On Aug 14, 8:27 am, Howard Brazee <how...(a)brazee.net> wrote:
> On Fri, 13 Aug 2010 12:27:32 -0700 (PDT), Richard
>
> <rip...(a)Azonic.co.nz> wrote:
> >As commas are entirely useless in terms of COBOL syntax I have found
> >it best to do a bulk find and replace to a space in the procedure
> >division, or indeed everywhere except text literals, in any programs
> >that come to me from outside.
>
> Since text literals can be in the procedure division, I expect this
> procedure may cause more errors than it avoids.

Which is why I said "except text literals".

> And in working storage, commas may be significant even when they are
> not in text literals.

In pictures, maybe.

As I said, commas are useless as syntax.

> (All of this is assuming commas aren't decimal points).

First  |  Prev  | 
Pages: 1 2 3 4 5 6 7
Prev: New to COBOL
Next: RosettaCode