switch and/or elseif statements

switch and/or elseif statements - Сообщения

#1 Опубликовано: 18.08.2012 10:42:34
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 Опубликовано: 12.09.2012 15:30:02
Edward Ulle

Edward Ulle

20 сообщений из 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 12.09.2012 18:31:00, Fridel Selitsky 13.06.2013 10:13:00
#3 Опубликовано: 12.09.2012 18:32:29
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений