  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 06/04/2023(UTC) Posts: 441   Was thanked: 50 time(s) in 43 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 2 time(s).
|
|
|
|
  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,641   Was thanked: 1400 time(s) in 817 post(s)
|
Когда-то return был, насколько я помню, но потом его убрали.  |
Russia ☭ forever (git.io/vOZo0) Viacheslav N. Mezentsev |
|
|
|
  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 06/04/2023(UTC) Posts: 441   Was thanked: 50 time(s) in 43 post(s)
|
Originally Posted by: uni  Когда-то return был, насколько я помню, но потом его убрали.  Need return return!
|
|
|
|
  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,641   Was thanked: 1400 time(s) in 817 post(s)
|
Или так.  |
Russia ☭ forever (git.io/vOZo0) Viacheslav N. Mezentsev |
|
|
|
  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,641   Was thanked: 1400 time(s) in 817 post(s)
|
Когда-то этот оператор был, но его убрали.  |
Russia ☭ forever (git.io/vOZo0) Viacheslav N. Mezentsev |
|
|
|
 Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866  Was thanked: 983 time(s) in 811 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: 153   Location: Wisconsin Was thanked: 73 time(s) in 46 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.