Re: Help! GO TO and PERFORM THRU!
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 28 Feb 2007 11:42:22 -0800
On Mar 1, 6:53 am, "Michael Mattias" <mmatt...@xxxxxxxxxxxxxx> wrote:
I find the same thing in BASIC.
These mean the same thing...
IF Condition1 THEN
DoSomething1
END IF
(called 'block if')
and
IF Condition1 THEN DoSomething1
(called "single-line if")
But you can mix and match and boy, that IS confusing...
In Python the scope of a conditional is entirely controlled by the
indenting. The scope ends when you outdent. This means the the
compiler follows the same rules that you do with your eyes.
if ( condition1 ):
if ( condition2 ):
action2only
another actio2
action1
You must ensure that the editor does not use tab characters, or only
uses tabs otherwise it is impossible to get it to work.
In Python you can't write code that looks confusing.
.
- Follow-Ups:
- Re: Help! GO TO and PERFORM THRU!
- From: Howard Brazee
- Re: Help! GO TO and PERFORM THRU!
- References:
- Help! GO TO and PERFORM THRU!
- From: Impy
- Re: Help! GO TO and PERFORM THRU!
- From: raul
- Re: Help! GO TO and PERFORM THRU!
- From: ruddy
- Re: Help! GO TO and PERFORM THRU!
- From: Pete Dashwood
- Re: Help! GO TO and PERFORM THRU!
- From: Michael Mattias
- Help! GO TO and PERFORM THRU!
- Prev by Date: Re: Help! GO TO and PERFORM THRU!
- Next by Date: Re: Reset data
- Previous by thread: Re: Help! GO TO and PERFORM THRU!
- Next by thread: Re: Help! GO TO and PERFORM THRU!
- Index(es):
Relevant Pages
|