Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #16  
Old 09-02-2007, 01:24 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

sfisque;
Are "if" and "elsif" any different? will Perl look at all the "ifs" or all the "elsifs"? or will it always stop at the first "if" or "elsif" once the it finds a match?
Reply With Quote
  #17  
Old 09-02-2007, 01:34 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

in a if...elsif..else construct, only ONE of the specificied conditions can be true.. so it will evaluate the IF first and then if that IF isn't TRUE, perl moves on to the first ELSIF.. if that is also not true then every elseif next is evaluated one at a time and in order until either one of the elsif are true OR it finally reaches an ELSE clause, if one is present.. Hope this is readable.. lol
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #18  
Old 09-02-2007, 06:10 PM
sfisque
Hill Giant
 
Join Date: Oct 2006
Posts: 248
Default

Quote:
Originally Posted by Angelox View Post
sfisque;
Are "if" and "elsif" any different? will Perl look at all the "ifs" or all the "elsifs"? or will it always stop at the first "if" or "elsif" once the it finds a match?
think of if/elsif...else blocks as the perl version of a C switch statement, where each if/elsif is analogous to a case X: and else is the default: subblock.

== sfisque
Reply With Quote
  #19  
Old 09-02-2007, 07:25 PM
sonicintuition
Hill Giant
 
Join Date: Jan 2005
Posts: 124
Default

You people lost me ... Anyway what I did works, I'll try the other one that sfisque posted after that ..see if that works, if it does ...yay, the file will be smaller

Regards,
Sonic
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:11 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3