( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?
Dennis Lee Bieber
wlfraed at ix.netcom.com
Mon Jan 24 23:22:10 EST 2000
On Tue, 25 Jan 2000 02:09:24 +0100, Stefan Schwarzer
<s.schwarzer at ndh.net> declaimed the following in comp.lang.python:
> Hello Dennis,
>
> Dennis Lee Bieber schrieb:
> > The only languages I've ever seen that use a text string for
> > those operators are FORTRAN and VMS DCL.
>
> The only programming languages I (personally) know to pay attention
> to amount of whitespace are Fortran, Assembler and Python ;-) .
>
So far as I know standard Fortran 77 is still white space
indifferent -- ignoring the old card punch parts: columns 1-5 for
statement labels, and column 6 for continuation, and the last 8 (of 80)
for sequence/comment. Most compilers these days will accept a single tab
as getting you past the continuation column, and the VMS compiler will
interpret "<tab><digit>" to mean "continuation". (As far as my coding
style -- start everything with a <tab> except labels and continuations,
in which I still use column 6 for continuation){disclaimer: Fortran 90
now if fully free format, using "&" at the end of the continued line,
rather than a marker on the continuation line}
Within a statement line, however, spaces only matter in string
constants.
i f ( 1 00 .0 . l t. a bs (x y z ) ) t he n
is the same as
if (100.0 .lt. abs(xyz)) then
Fortran is not an easy language to parse -- it has to reach the
decimal point or comma to determine which of the following is an
assignment and which is a do-loop:
do 10 i = 1 . 35
do 10 i = 1 , 35
(at which point it has to back track to either reference a floating
point variable "do10i" or a loop index "i" with statement label "10").
--
> ============================================================== <
> wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed at dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list