REBOL for COBOL programmers

Go to table of contents Go to feedback page

VALUE

Date written: April 8, 2013
Date revised:
Date reviewed:

This page explains some REBOL equivalents of VALUE.


COBOL VALUE

The VALUE clause in COBOL is used to assign initial values to data items. Some versions of COBOL have the INITIALIZE statement also. Some examples:

77  identifier-1   PIC X(10) VALUE SPACES.
77  identifier-2   PIC 9(4)  VALUE 0001.
And so on, as you know.

The REBOL equivalent

In REBOL, since you don't have to declare data items, assigning them initial values is not done as much, but it can be done. You would use the "assignment" operation in some part of your program where you "defined" the data items.

identifier-1: ""
identifier-2: 0
Keep in mind that you are not really "defining" data items nor "assigning" them initial values that exist before the program is run. You are just using REBOL to make it seem that way.