problem with if

problem with if - programming if does not show else - 消息

#1 已发布: 2022/9/24 15:02:57
Carlos Couto

Carlos Couto

0个赞,共2个帖子。

组: User

Hi,
Maybe this is a very dumb question but how can I add a "if else" structure?
When I click the "if" in the programming toolbar no "else" is added.
#2 已发布: 2022/9/24 15:23:49
Carlos Couto

Carlos Couto

0个赞,共2个帖子。

组: User

OK, this happens in last version. I checked in build 8151 it does not occur, seems like a bug.
#3 已发布: 2022/9/24 18:32:34
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

The if function now has a variable number of operands. The side panel and the dynamic assistant insert the binary form by default. Just type one or more argument separators immediately after insterting the function and see what happens. Likewise you can delete operators by typing backspace.

The binary form is a compact notation if you don't need the else clause.

However, I prefer the cases() function from the custom functions plugin, because it is more compact.

ifcases.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
Oscar Campo 2022/10/21 12:29:00
#4 已发布: 2022/10/6 23:21:22
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Ah-h! Good to know. I was scratching my head on this one!

Thank you!

Norm
  • 有新帖
  • 无新帖