REBOL for COBOL programmers |
DISPLAY
Date written: March 20, 2013 This page explains some REBOL equivalents of DISPLAY. COBOL DISPLAYThe DISPLAY verb is for low-volume output to some sort of operator display terminal. When COBOL was invented, this probably would have been a typewrite-like device in a sealed computer room. ACCEPT { identifier-1 } { literal-1 } ...Notice the three dots. That means that you can display several items and they will be strung together. For example, 77 TEST-VAL PIC X(10) VALUE "OFF-LINE" ... DISPLAY "THE VALUE OF TEST-VAL IS " TEST-VAL The REBOL equivalentThe closest REBOL command to DISPLAY is "print." For example: print { identifier-1 } { literal-1 }The identifier-1 can be any word in your program. The literal-1 can be a literal just like COBOL. If you want to print several things strung together, the identified-1 can refer to a block. For example: TEST-VAL: "OFF-LINE" print ["THE VALUE OF TEST-VAL IS" TEST-VAL] There are other ways to display stuff in REBOL. The "print" function is just the way that is closest to the DISPLAY verb. Other output methods will be shown when appropriate in other examples elsewhere. |