If Else If Statements

If Else If Statements - How to make an Else If statement - Сообщения

#1 Опубликовано: 13.12.2023 19:30:07
Captain_North

Captain_North

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

Группа: User

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!

#2 Опубликовано: 13.12.2023 22:22:09
Jean Giraud

Jean Giraud

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

Группа: User

1. if/else from program palette
2. alternately from fx menu
3. if/otherwise from fx menu cases
#3 Опубликовано: 14.12.2023 00:29:25
Martin Kraska

Martin Kraska

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

Группа: Moderator

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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Опубликовано: 14.12.2023 05:57:38
Jean Giraud

Jean Giraud

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

Группа: User

Mathcad has if/else in two styles
like Smath and single line => very convenient compactor.
#5 Опубликовано: 14.12.2023 08:43:51
overlord

overlord

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

Группа: Moderator

Wrote

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
1 пользователям понравился этот пост
Oscar Campo 18.12.2023 06:16:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений