Rank: Advanced Member Groups: Registered, Advanced Member Joined: 06/04/2023(UTC) Posts: 341 Was thanked: 26 time(s) in 25 post(s)
|
Simple in Mathcad with the return operator. Will be good to have it in SMath - see the attach NaCl-w-T.sm (15kb) downloaded 0 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Когда-то return был, насколько я помню, но потом его убрали. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 06/04/2023(UTC) Posts: 341 Was thanked: 26 time(s) in 25 post(s)
|
Originally Posted by: uni Когда-то return был, насколько я помню, но потом его убрали. Need return return!
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Или так. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Когда-то этот оператор был, но его убрали. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: OchkovVF Simple in Mathcad with the return operator. Will be good to have it in SMath
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 11/01/2018(UTC) Posts: 134 Location: Wisconsin Was thanked: 62 time(s) in 39 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). May this be of Good Help, - SK Kenny Lemens, P.E. ᵂᴵ |
|
|
|
|
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.