But trying to parse free-form text and do macro expansions with
string substitutions ... disaster in COBOL. Hard enough in FORTRAN.
On Wed, 7 Jan 2026 14:11:10 -0000 (UTC), Lars Poulsen wrote:
But trying to parse free-form text and do macro expansions with
string substitutions ... disaster in COBOL. Hard enough in FORTRAN.
Hard to see the point in an assembler without such features, though.
I did a COBOL program to do string substitutions. The idea was that it
read a COBOL program written possibly by a blind hacker and substituted variable names with longer, standardized ones.
On Wed, 7 Jan 2026 19:16:03 -0700, Peter Flass wrote:
I did a COBOL program to do string substitutions. The idea was that it
read a COBOL program written possibly by a blind hacker and substituted
variable names with longer, standardized ones.
Did it understand the rules of IN-scoping?
On 1/7/26 19:24, Lawrence D?Oliveiro wrote:
On Wed, 7 Jan 2026 19:16:03 -0700, Peter Flass wrote:
I did a COBOL program to do string substitutions. The idea was that it
read a COBOL program written possibly by a blind hacker and substituted
variable names with longer, standardized ones.
Did it understand the rules of IN-scoping?
COBOL had no concept of "scope" back then.
But trying to parse free-form text and do macro expansions with
string substitutions ... disaster in COBOL. Hard enough in FORTRAN.
Using "OCCURS DEPENDING ON" COBOL easily processes variable length,
variably located strings.
On Fri, 09 Jan 2026 14:22:34 -0500, Dan Espen wrote:
Using "OCCURS DEPENDING ON" COBOL easily processes variable length,
variably located strings.
Up to a limit, always, e.g.
OCCURS [ integer-1 TO ] integer-2 TIMES [ DEPENDING ON data-name-1 ]
Lawrence D?Oliveiro <ldo@nz.invalid> writes:
On Fri, 09 Jan 2026 14:22:34 -0500, Dan Espen wrote:
Using "OCCURS DEPENDING ON" COBOL easily processes variable
length, variably located strings.
Up to a limit, always, e.g.
OCCURS [ integer-1 TO ] integer-2 TIMES [ DEPENDING ON data-name-1 ]
Well beyond any reasonable limit.
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 16 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 104:29:28 |
| Calls: | 207 |
| Files: | 21,502 |
| Messages: | 84,080 |