Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 18 August 2012 17:42:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
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

Edited by user 18 August 2012 18:05:45(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline TheWizEd  
#2 Posted : 12 September 2012 22:30:02(UTC)
TheWizEd


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2010(UTC)
Posts: 178
Man
United States

Was thanked: 19 time(s) in 13 post(s)
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
thanks 2 users thanked TheWizEd for this useful post.
on 13/09/2012(UTC),  on 13/06/2013(UTC)
Offline Davide Carpi  
#3 Posted : 13 September 2012 01:32:29(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: TheWizEd Go to Quoted Post
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 Good Thank you
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.