if then else statement

if then else statement - Mensajes

#1 Publicado: 24/3/2019 15:57:17
jbv74

jbv74

0 me gusta en 3 mensajes.

Grupo: 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) descargado 1157 vez(es).
#2 Publicado: 24/3/2019 16:47:44
sergio

sergio

127 me gusta en 342 mensajes.

Grupo: User

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

sergio
#3 Publicado: 24/3/2019 18:34:24
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

Thank you for your help



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

jbv74

0 me gusta en 3 mensajes.

Grupo: User

Thanks
  • Nuevos mensajes
  • Sin mensajes nuevos