return

return - Needed in Smath - Mensajes

#1 Publicado: 30/4/2023 15:39:45
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Simple in Mathcad with the return operator.
Will be good to have it in SMath - see the attach
NaCl-w-T-Mathcad.png
NaCl-w-T.sm (14,41 KiB) descargado 1682 vez(es).
#2 Publicado: 30/4/2023 15:46:55
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Когда-то return был, насколько я помню, но потом его убрали.

error.png
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Publicado: 30/4/2023 15:53:38
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Wrote

Когда-то return был, насколько я помню, но потом его убрали.

error.png



Need return return!

#4 Publicado: 30/4/2023 15:57:02
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Или так.

lasterror.png
Russia ☭ forever, Viacheslav N. Mezentsev
#5 Publicado: 30/4/2023 16:08:14
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Когда-то этот оператор был, но его убрали.

return.png
Russia ☭ forever, Viacheslav N. Mezentsev
#6 Publicado: 1/5/2023 10:47:14
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

Simple in Mathcad with the return operator.
Will be good to have it in SMath



return.png

#7 Publicado: 1/5/2023 11:41:44
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

Unstructured exits are best avoided when possible; there is merit in preventing unstructured exits.

On that note, you may want to create your variable at the top of your function, assign it the value as desired, and 'return' it as the last line of your functions as such ('break' can be used to terminate a loop, which can be used to optimize runtime in lieu of a return).

SMath_Alt_return.jpg



May this be of Good Help,
- SK Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
  • Nuevos mensajes
  • Sin mensajes nuevos