EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Aggravated - HELP (please :) ) (https://www.eqemulator.org/forums/showthread.php?t=23571)

Angelox 09-02-2007 01:24 PM

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?

WildcardX 09-02-2007 01:34 PM

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

sfisque 09-02-2007 06:10 PM

Quote:

Originally Posted by Angelox (Post 137893)
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

sonicintuition 09-02-2007 07:25 PM

You people lost me ... :-D 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


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

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.