gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Please double check my tutorial


From: Brian Tiffin
Subject: Re: [open-cobol-list] Please double check my tutorial
Date: Sun, 15 Sep 2013 18:20:08 -0400

I like this initiative Patrick.

And, if this works out we can add the 'dictionary' to all kinds of
tooling.  Vim supports weblinks for contextual help and
omni-completion, for instance.  The GPS GNAT Ada IDE can take links
for keyword help. An external cobhelp (or some such) could take a
reserved word and dump out a wiki page entry, etcetera, ecetera.

Me likey.

Cheers,
Brian

On 9/15/13, Patrick <address@hidden> wrote:
> Hi Everyone
>
> I want to practice my Cobol and I want to study how each construct ends
> up as C code, to help me better understand libcob and cobc from a
> output-backwards approach, this will supplement my study of the source
> code that is an input-forwards approach.
>
> I am making a tutorial that can be shared with others later.
>
> It will have some programs and a directory for each reserved word.
>
> Here is the naming conventions and strategy.
>
> In the topmost directory I want to make a bunch of programs. They will
> be named with short names as this will be reused later to indicate the
> relations between various programs later.
>
> I have a program at the bottom of this email that is in the topmost
> directory, simply named P001.cob for program 1.
>
> I will then copy and past it into the ACCEPT directory, it is now
> commented beside the ACCEPT statement.
>
> I will then remove this comment from P001.cob, re-comment it and copy it
> into another folder concerning another reserved word. In the ACCEPT
> folder I am going to rename it ACCEPT-P001.cob to show that it is just
> copied from P001.
>
> This would be a stupid strategy for writing code, copying the same code
> all over the place but I think it will be suitable for a tutorial and
> will create a sort of dictionary that people could use to look up the
> use of code in a full program, not just a snippet.
>
>   what do you guys think?
>
> I am using SOURCE is FREE for my examples, is there a reason not to?
>
> BTW I also like to write reserved words in capitals but I will mention
> somewhere that this is not required.
>
> Thanks-Patrick
>
>
>
>
>
>              >> SOURCE is FREE
> IDENTIFICATION DIVISION.
> PROGRAM-ID. P001.
> DATA DIVISION.
> WORKING-STORAGE SECTION.
> 01 nothing PIC X VALUE IS SPACE .
>
> SCREEN SECTION.
> 01 simple-screen .
>     05 LINE 5 COLUMN 5 VALUE "Type anything, then enter to exit" .
>
>     05 LINE 5 COLUMN 40 TO nothing .
>
> PROCEDURE DIVISION.
>    DISPLAY simple-screen
>
>      PERFORM UNTIL nothing  NOT = SPACE
>
>        ACCEPT simple-screen  *> Here ACCEPT is used to pass the screen
> information to the program
>
>      END-PERFORM
>
>
> STOP RUN.
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]