switch and/or elseif statements

switch and/or elseif statements - 消息

#1 已发布: 2012/8/18 10:42:34
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Hi all,

I wondered if it was possible to implement new statements such as "switch-case" or "else if" to simplify and make the script more readable when a variable must be processed with more than two criteria (actually the only way it's to nest many "if/else" )


regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#2 已发布: 2012/9/12 15:30:02
Edward Ulle

Edward Ulle

21个赞,共182个帖子。

组: Moderator

w3b,

Here is a little trick I learned to simulate a switch statement. func is a matrix and the last statement is an element of the matrix.

Ed
2位用户喜欢此帖子
Davide Carpi 2012/9/12 18:31:00, Fridel Selitsky 2013/6/13 10:13:00
#3 已发布: 2012/9/12 18:32:29
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Wrote

w3b,

Here is a little trick I learned to simulate a switch statement. func is a matrix and the last statement is an element of the matrix.



wonderful trick
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • 有新帖
  • 无新帖