Collective memory (was: Good code patterns in Python)

Charles Richmond richmond at ev1.net
Tue Jul 8 14:27:03 EDT 2003


Kevin Handy wrote:
> 
>        [snip...]        [snip...]        [snip...]
>
> FORTRAN isn't indentation dependent, it is position dependent.
> There is a big difference between the two.
> 
> In FORTRAN, certial columns were allocated to specific purposes.
> 1-5 for the line number, 6 for comment/continuation, 7-75 for the
> program line, 76-80 for sequence numbers. [iirc]
> 
> If you want a language that was even more position dependent than
> fortran, look at RPG-II. You used printed forms for programming to
> get the columns correct. One character in the wrong column would
> change the meaning of that line.
> 
IIRC, people who programmed RPG-II on a computer terminal...had
a plastic overlay for the screen so they could see what column
that things were being typed into. 

The "C" language gives white space significance...especially
if it determines what a token will be. The tokenizer tries to
build the longest token possible. So:

		x = i++ + j;

is *not* the same as:

		x = i + ++j;

and the statement:

		x = i+++j;

is the same as:

		x = i++ + j;

If you have:

int  *p, x, y;

then:

		y = x/*p;

is quite different from:

		y = x / *p;

The first way, "/*" will begin a comment...the second way,
you get the integer "x" divided by the integer pointed to by "p".


--
+----------------------------------------------------------------+
|   Charles and Francis Richmond     richmond at plano dot net   |
+----------------------------------------------------------------+




More information about the Python-list mailing list