switch and/or elseif statements

switch and/or elseif statements - Messages

#1 Posted: 8/18/2012 10:42:34 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: 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 Posted: 9/12/2012 3:30:02 PM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: 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 users liked this post
Davide Carpi 9/12/2012 6:31:00 PM, Fridel Selitsky 6/13/2013 10:13:00 AM
#3 Posted: 9/12/2012 6:32:29 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: 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
  • New Posts New Posts
  • No New Posts No New Posts