Everyone,

Thanks so much for the interest demonstrated by the overwhelming
number of responses and suggestions.

I have decided that the most likely solution is to simple create a
syntax entry restricting the
infamous asterisk from appearing in columns 8 - 11.

The comment will (should) still be defined as having the * (splat) in
column 7.
All other lines having it in 12 and beyond should (hopefully) be
allowed.

Now the next question.
    Who out there can provide me with the cryptic filter to look for a
splat in 8 - 12?  I will try to
    finger out how to implement it in the syntax file.  Here are the
lines in my file.

__________________________  From cobol.vim
_______________________________

syn match   cobolBadLine      "^.\{6\}[^ D\-*$/].*"hs=s+6

" If comment mark somehow gets into column past Column 7.
syn match   cobolBadLine      "^.\{6\}\s\+\*.*"
                             ^^^^^^^^^^^^^^^^^^^^^
___________________________________________________________________________

I suspect the line above is the one to be doctored but not real sure.



Regards,
Lynn Garrison


On Nov 14, 3:11 pm, Tony Mechelynck <[EMAIL PROTECTED]>
wrote:
> On 14/11/08 21:55, John Culleton wrote:
>
>
>
>
>
> > On Friday 14 November 2008 03:51:47 pm Tony Mechelynck wrote:
> [...]
> >> Using the example above, and remembering that I worked on computers
> >> which didn't know about lowercase,
>
> >>        COMPUTE A = ((B + C) / D)
> >>                * ((E * F) + G).
>
> >> is a perfectly valid COBOL sentence provided that it appears in the
> >> PROCEDURE DIVISION, both its lines start no earlier than column 12
> >> (and end no later than column 72 in fixed-form COBOL), and that all
> >> the data items it uses are defined in the DATA DIVISION. No
> >> column-7 dash is required, but there must be a period followed by a
> >> space somewhere (no later than the end of the paragraph, which is
> >> just before the next procedure-name i.e. label) to end the
> >> sentence. In slightly more verbose COBOL, the above sentence is
> >> equivalent to
>
> >>        COMPUTE A = ((B PLUS C) DIVIDED BY D)
> >>                MULTIPLIED BY ((E TIMES F) PLUS G.
>
> >> or even, in a somewhat older version of the standard where the
> >> COMPUTE verb didn't exist, and with two more WORKING-STORAGE
> >> SECTION data items of appropriate PICTURE:
>
> >>        ADD B C GIVING TEMP-1.
> >>        DIVIDE D INTO TEMP-1.
> >>        MULTIPLY E F GIVING TEMP-2.
> >>        ADD G TO TEMP-2.
> >>        MULTIPLY TEMP-1 TEMP-2 GIVING A.
>
> >> Best regards,
> >> Tony.
>
> > Since we are talking the original fixed format, would not the problem
> > be solved if line numbers actually appeared in columns 1-6?
>
> > Writing the COBOL program that takes the source program and renumbers
> > it is left as an exercise for the student.  I have mine :<).
>
> When given a source with columns 1-6 blank overall (or even just blank
> in the IDENTIFICATION DIVISION header), the compiler I used (and the
> librarian I used to move the source from Hollerith cards to magnetic
> tape) would renumber them in steps of 10 starting at 000010 :-). But I
> forgot the closing paren after PLUS G
>
> Best regards,
> Tony.
> --
>      A KNIGHT rides into shot and hacks him to the ground.  He rides off.
>      We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
>      twin-set emerges from the trees and looks in horror at the body of her
>      HUSBAND.
> MRS HISTORIAN: FRANK!
>                   "Monty Python and the Holy Grail" PYTHON (MONTY)
> PICTURES LTD- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to