Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline OchkovVF  
#1 Posted : 30 April 2023 21:39:45(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 429
Man
Russian Federation

Was thanked: 42 time(s) in 39 post(s)
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 (15kb) downloaded 2 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline uni  
#2 Posted : 30 April 2023 21:46:55(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,623
Man
Russian Federation

Was thanked: 1385 time(s) in 808 post(s)
Когда-то return был, насколько я помню, но потом его убрали.

error.png
Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline OchkovVF  
#3 Posted : 30 April 2023 21:53:38(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 429
Man
Russian Federation

Was thanked: 42 time(s) in 39 post(s)
Originally Posted by: uni Go to Quoted Post
Когда-то return был, насколько я помню, но потом его убрали.

error.png


Need return return!

Offline uni  
#4 Posted : 30 April 2023 21:57:02(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,623
Man
Russian Federation

Was thanked: 1385 time(s) in 808 post(s)
Или так.

lasterror.png
Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline uni  
#5 Posted : 30 April 2023 22:08:14(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,623
Man
Russian Federation

Was thanked: 1385 time(s) in 808 post(s)
Когда-то этот оператор был, но его убрали.

return.png
Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline Jean Giraud  
#6 Posted : 01 May 2023 16:47:14(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 983 time(s) in 811 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
Simple in Mathcad with the return operator.
Will be good to have it in SMath


return.png

Offline Kenny Lemens  
#7 Posted : 01 May 2023 17:41:44(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 150
Man
United States
Location: Wisconsin

Was thanked: 71 time(s) in 45 post(s)
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 Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
Users browsing this topic
Similar Topics
Combobox Return Multiple Values (Questions)
by kotichaz 10/11/2022 08:27:14(UTC)
Return constant from plugin (Questions)
by johnnyontheweb 20/09/2021 19:35:14(UTC)
Loop Not Returning All Values (Questions)
by davidlimtw 27/01/2021 22:23:36(UTC)
[SS-2319] vectorize(): inconsistent treatment of functions returning matrices (Bugs & Problems)
by mikekaganski 23/04/2016 07:15:07(UTC)
Plugin development: problems assigning units and returning text (Questions)
by mikekaganski 12/02/2015 07:58:22(UTC)
RETURN(expr) operator inside a function (Feature Requests)
by tomtit 28/02/2014 18:32:06(UTC)
Font size returns to 10 (Questions)
by rmodesi 14/01/2011 05:39:27(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.