if then else statement

if then else statement - 消息

#1 已发布: 2019/3/24 15:57:17
jbv74

jbv74

0个赞,共3个帖子。

组: User

Hello

I'm new in Smath

I want to do "if δ>0 then k=a+b else k=c+d"

But impossible to include the equation k:=a+b in the "if statement"

When I type "equal" after "k", the "equal" sign is put on the fist line and answer "k-not defined"

I found an exemple on the forum but I'm not able to reproduce it by myself

My test file is attached

Thank you for your help

test if statement.sm (5.23 KiB)已下载 1168 次。
#2 已发布: 2019/3/24 16:47:44
sergio

sergio

127个赞,共342个帖子。

组: User

you have to type ":" (colon) and not "=" (equal)

sergio
#3 已发布: 2019/3/24 18:34:24
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Thank you for your help



if_else.PNG
#4 已发布: 2019/3/30 15:52:09
jbv74

jbv74

0个赞,共3个帖子。

组: User

Thanks
  • 有新帖
  • 无新帖