Granted its been awhile since ive done application code, but if you dont end-if they become a nested condition, which I dont think was the original intent.
Joe On Sat, Jun 6, 2020 at 1:40 PM Paul Gilmartin < 0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote: > On Sat, 6 Jun 2020 15:28:57 -0300, Clark Morris wrote: > > >On 6 Jun 2020 10:53:44 -0700, (Bob Bridges) wrote: > > > >>Oh, you need an END-IF even for a single-statement IF? I forgot; I've > been thinking in REXX too long. In that case you're close; I guess I > really meant > > > But in Rexx similarly, END is required even for a single-statement DO. > Good for Rexx. I like strong closure. > > >In your example the END-IF is not needed. However beginning with VS > >COBOL IIV4 (1985 standard) it became better practice to eliminate all > >but the last period in a paragraph and terminate all conditional with > >end statements such as END-IF. With Enterprise COBOL 5.2 and later > >(2002 Standard) the 1050-EXIT paragraph could be eliminated and the GO > >TOs replaced with EXIT PARAGRAPH. This allow simpler code generation > >for the PERFORM and the PERFORMed paragraph be moved inline to in > >effect replace the PERFORM statement. Also look up inline PERFORMs. > >In general, because of code optimization starting with VS COBOL II > >release 4 (1985 standard) GO TO became a bad idea. > > > Always a bad idea, or just usually? > > -- gil > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN