SMath Studio Forum
»
SMath Studio
»
Questions
»
How can I evaluate the variables in the loop
Rank: Advanced Member Groups: Registered
Joined: 07/12/2018(UTC) Posts: 44 Was thanked: 1 time(s) in 1 post(s)
|
Dear Smath-experts, How can I evaluate the variables in the loop in SMATH? I want to see how the variables are changing in the loop like in python. Is what debug is for, but how does it work? Best regards, Andrey
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
You can either use the function trace() to show some specific variables (data will be shown in the "output" window on the fly without stopping evaluations) or use the debugger. This is more in "Visual Studio IDE style" and shows you the whole context in a specific point (the breakpoint); this means that the execution is paused when those points are evaluated. To add/remove a breakpoint you can use the context menu (mouse right-click) |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: andrbig77 I want to see how the variables are changing in the loop You can see it outside the loop, same more vivid. Cheers ... Jean. 0Anim Landing.sm (57kb) downloaded 13 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 248 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Originally Posted by: andrbig77 Dear Smath-experts,
How can I evaluate the variables in the loop in SMATH? I want to see how the variables are changing in the loop like in python. Is what debug is for, but how does it work?
...
Best regards, Andrey Hi Andrey, you can use trace() for check how variables are changing in the loop: Regards, Oscar
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... for convenience make it algo style collapsed in utilities. Thus, you will have it from in-situ command line. Cheers ... Jean. Utilities Discrete CUMULATIVE algo.sm (5kb) downloaded 4 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
trace() or breakpoints are usually de-facto way to go. Alternatively you can store variables to a matrix. Regards Edited by user 11 September 2021 16:39:18(UTC)
| Reason: Not specified
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
How can I evaluate the variables in the loop
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.