if then else statement

if then else statement - Poruke

#1 Objavljeno: 24. 3. 2019. 15:57:17
jbv74

jbv74

0 svidjanja u 3 postova.

Grupa: 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) preuzeto 1186 put(ova).
#2 Objavljeno: 24. 3. 2019. 16:47:44
sergio

sergio

127 svidjanja u 342 postova.

Grupa: User

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

sergio
#3 Objavljeno: 24. 3. 2019. 18:34:24
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

Thank you for your help



if_else.PNG
#4 Objavljeno: 30. 3. 2019. 15:52:09
jbv74

jbv74

0 svidjanja u 3 postova.

Grupa: User

Thanks
  • Novi postovi
  • Nema novih postova