Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Davide Carpi Usually I prefer a binary output, since can be used... Fair point, I withdraw my proposal.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 249 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Originally Posted by: Davide Carpi Usually I prefer a binary output, since can be used inside if/else functions independently from localizations, future enhancements of descriptions, and string comparision issues. I'll think about it.
Maybe the options could be: arg == 1 --> "All cleared" arg == 0 --> "Variables cleared" arg == -1 --> "Functions cleared" So it can be used easily in if/else functions. Oscar
|
|
|
|
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)
|
Wouldn't be easier to return the input number? ClearAll(1) == 1 --> "All cleared" ClearAll(2) == 2 --> "Variables cleared" ClearAll(3) == 3 --> "Functions cleared" ClearAll(x) == 0 --> "nothing done" Edited by user 12 October 2023 13:57:43(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
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: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
In terms of readibility I'd prefer
ClearAll() ClearVars() ClearFunctions()
each returning 1 or 0. |
|
3 users thanked mkraska for this useful post.
|
on 13/10/2023(UTC), on 12/10/2023(UTC), on 14/10/2023(UTC)
|
|
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)
|
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
2 users thanked Davide Carpi for this useful post.
|
on 02/11/2023(UTC), on 02/11/2023(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
Can't find the update in the online gallery.
A suggested extension for Clear(): could you allow for any expression and clear all variables and functions in it (all user defined ones). In particular, a list or a matrix of variable names would be convenient. |
|
|
|
|
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)
|
Originally Posted by: mkraska Can't find the update in the online gallery. I know, the release manager it's not working as expected currently; that's why I've added a direct link (the zip containing the plugin must be downloaded and dragged into the canvas). |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
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)
|
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 03/05/2021(UTC) Posts: 2 Location: Azuay
|
Originally Posted by: Davide Carpi Gracias
|
|
|
|
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.