[Haskell-cafe] "Haskell is a scripting language inspired by Python."

Richard O'Keefe ok at cs.otago.ac.nz
Tue Nov 9 17:33:34 EST 2010


On 10/11/2010, at 12:50 AM, Bulat Ziganshin wrote:

> i never programmed in COBOL, but afaik data structures usually was
> organized this way - together with level numbers at left. it was just
> easier to read it this way

The clue here is "level numbers".

In a declaration like
	01 Thingy
	   03 Wotsit
	      05 Uggle PIC X(5)
	      05 Zonko PIC 9(4) USAGE COMPUTATIONAL
	   03 Snork
	      05 Name  PIC X(20)
	      05 Price PIC 9999V99 USAGE DISPLAY.
the indentation is solely for the benefit of people.
The compiler uses the *numbers* to figure out the
structure.
	01 Thingy 03 Wotsit 05 Uggle PIC X(5) 05
         Zonko PIC 9(4) USAGE COMPUTATIONAL 03 Snork
	 05 Name PIC X(20) 05 Price PIC 9999V99 USAGE DISPLAY.
would work every bit as well.  The same is true of PL/I,
which also used level numbers for structuring.




More information about the Haskell-Cafe mailing list