REBOL for COBOL programmers

Go to table of contents Go to feedback page

What you may/must say

Date written: September 25, 2012
Date revised:
Date reviewed:

This page discusses the concept that languages are interesting in what you are able to say and also in what you are required to say.


The general idea

Someone has said that languages are interesting for what you may say and also for what you must say. Eskimos have several words for snow; Minnesotans have one. English speakers must express tense; Chinese don't. If you have years of COBOL experience, you are so used to the four division, and declaring WORKING-STORAGE data, that you might think all languages require things like that. They don't.

The COBOL divisions

The only thing required in REBOL is the header:

REBOL []
You may put other stuff inside the brackets, but it is not required. More about that is explained later.

Declaring files

In COBOL you must indicate any files you will be accessing. In REBOL there is no such thing. More about that later also.

Declaring data

In COBOL every variable must be declared, either in the FILE SECTION or the WORKING-STORAGE section. In REBOL, variables come into existence when you refer to them. You can fake a file declaration by setting a variable to some initial value, but that can have drawbacks. More about that later, too.