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 Captain_North  
#1 Posted : 14 December 2023 01:30:07(UTC)
Captain_North

Rank: Newbie

Groups: Registered
Joined: 01/12/2023(UTC)
Posts: 1
Netherlands
Location: Nieuw-Lekkerland

Hello dear Smath Users,

I accidentally pressed the keyboard once and created an Else-If statement like this:

Afbeelding5.png

Lately I have been struggling to find this option of an Else If statement on Smath studio.

There seemed to be no information on this topic anywhere.

So I figured it out myself:

--Type "if" and press the TAB key.
--Click in the place above the "Else" portion of the If statement.
--Now press ";" and you should get an If Else-If statement.

Kind Regards!

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

Offline Jean Giraud  
#2 Posted : 14 December 2023 04:22:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
1. if/else from program palette
2. alternately from fx menu
3. if/otherwise from fx menu cases
Offline mkraska  
#3 Posted : 14 December 2023 06:29:25(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
You add and remove entries just as within vectors or lists (sys) or command blocks (line). If you don't need command blocks in the entries, then probably the cases() function from the custom functions plugin is more reader-friendly than cascades of if().

Programmierung_011.png
Programmierung_012.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#4 Posted : 14 December 2023 11:57:38(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Mathcad has if/else in two styles
like Smath and single line => very convenient compactor.
Offline overlord  
#5 Posted : 14 December 2023 14:43:51(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Captain_North Go to Quoted Post
Lately I have been struggling to find this option of an Else If statement on Smath studio.

Original if() didn't have else if just over a year ago.
Only persistent else statement existed with one if.
Nowadays you can even eliminate else.

Regards

2023-12-13_18-03.png
thanks 1 user thanked overlord for this useful post.
on 18/12/2023(UTC)
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.