Jump to content











Photo
- - - - -

Else statement


  • Please log in to reply
5 replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 May 2008 - 07:33 AM

Funcion of the new Else statement is explained rather easily:
  • The statement is optional and may not necessarily be used
  • When it is used, the statement must be placed immediatelly following an If statement.
  • If the condition of the last If statement is not fullfilled, the command part of the Else statement is executed.
Sample
[process]

	 If,1,Equal,1,If,2,equal,2,Echo,"IF"

	 Else,Echo,"ELSE"

	 If,1,Equal,1,If,2,equal,3,Echo,"IF"

	 Else,Echo,"ELSE"

	 If,1,Equal,2,If,2,equal,2,Echo,"IF"

	 Else,Echo,"ELSE"

	 If,1,Equal,2,If,2,equal,3,Echo,"IF"

	 Else,Echo,"ELSE"

Else.gif

Peter

#2 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 14 May 2008 - 07:40 AM

Thanks for the expanation Peter!

Regards,
Galapo.

#3 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 14 May 2008 - 10:17 AM

So else can be used, but doesn't have to be used, right?

:lol:

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 May 2008 - 10:35 AM

So else can be used, but doesn't have to be used, right?

:lol:

You are right! :thumbup:

I change above.

Peter

#5 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 14 May 2008 - 10:51 AM

The statement is optional and must not necessarily be used


Better: The statement is optional and may not necessarily be used
Or: The statement is optional and does not have to be used

Regards,
Galapo.

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12702 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 May 2008 - 11:07 AM

Better: The statement is optional and may not necessarily be used
Or: The statement is optional and does not have to be used


Thanks for the English lesson!

Peter :lol:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users