REBOL for COBOL programmers

Contents

Date written: April 13, 2012
Date revised: December 30, 2015
Date reviewed:

This is the table of contents of a set of pages that explain the REBOL programming language from the point of view of a person who knows COBOL as his primary programming language and might have trouble understanding REBOL because of trying to fit REBOL into the paradigm of COBOL.


Home to www.cobolrebol.com Go to feedback page

A note about javascript and the following pages

To make this look the way I want, I try to produce a table of contents down the left side of each page. I don't want to actually put that table of contents on each page because it would be a nightmare to update every page any time I add a new page. Therefore, to produce the table of contents, I use javascript to write it to each page. If you have javascript turned off, you won't see the table of contents on each page.

To allow for your desire not to use javascript, the table of contents is produced in one other place, namely, this page. Each content page will have a link back to this page, which you may use if you don't have the javascript table of contents down the left side of each page. The table of contents below is (or should be if I am on top of things) the same as the table of contents on the left of each page.

Therefore, if you try to display a page and your computer gives some warning about content being loaded and do you want to allow it or not, the content being referred to is a javascript script that will write the table of contents down the left side of the page you are trying to view.

A note about code samples

These pages contain some code samples. Any code samples on this site were harvested from the main REBOL site or the rebol.org script library, or were written by me. You are free to have them to do as you please with them The ones on the REBOL sites you could have gotten yourself. The ones I wrote are free from any restrictions. Some of them I did write at my day job, and their freedom has been confirmed in writing by our legal department.

Table of contents

Generalities
Introduction
Reserved words
What you may/must say
Right-to-left evaluation
Programming by side effects
Code is data
The Global Context
Coding REBOL like COBOL
IDENTIFICATION DIVISION
ENVIRONMENT DIVISION
FILE SECTION
WORKING-STORAGE SECTION
SCREEN SECTION
PROCEDURE DIVISION
COPY statement
Printing
Your own mezzanine
Module testers
Module documentation idea
Program structure suggestion
List of all code samples

Some useful equivalencies
ACCEPT
ADD
COMPUTE
DISPLAY
DIVIDE
EXIT
INSPECT
MOVE
MULTIPLY
IF
OCCURS
PERFORM
READ
REMAINDER
ROUNDED
SEARCH
SET
TODAYS-DATE
TIME
VALUE

What's in your head, Boy?
Introduction
Similar but not the same
Colon is not assignment
Be careful defining
A shorter letter
On punctuation
Why so dense?

Doing COBOLish things
Fixed-format file

Sample applications
Introduction
Source code as corporate asset
Sample 1, NACHA list
Introduction
Global services modules
Start writing