Re: Use of If/Then/Else


[Prev][Next][Index][Thread]

Re: Use of If/Then/Else



On Mon, 16 Sep 1996, Cullen Stevenson wrote:


> A more efficient way to use it is this
> if <condition>:<then action>
> if the condition isnt met it automatically goes to the next line.. and
> you dont need to use END. So it saves space.
>
> Like..
> if A=3:0->B
>


This 'short-cut' only works if there is only one line of code to execute
if the condition is true.  In order to execute multiple lines of code,
the Then statement is necessary.  Then and Else must be used if there is/are
line(s) to be excuted depending if the condition is true or false.


__________________________
John Logan
n9342326@henson.cc.wwu.edu


References: