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

Notification

Icon
Error

Login


2 Pages<12
Options
Go to last post Go to first unread
Offline overlord  
#21 Posted : 11 October 2023 22:06:47(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Usually I prefer a binary output, since can be used...

Fair point, I withdraw my proposal.

Offline oscampo  
#22 Posted : 12 October 2023 01:50:26(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 249
Man
Colombia
Location: Cali, Colombia

Was thanked: 87 time(s) in 66 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post

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
Offline Davide Carpi  
#23 Posted : 12 October 2023 11:53:23(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
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
thanks 1 user thanked Davide Carpi for this useful post.
on 12/10/2023(UTC)
Offline Jean Giraud  
#24 Posted : 12 October 2023 14:33:54(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 981 time(s) in 809 post(s)
algo style ... nothing to Clear(,) in there.

Stat Hypergeometric NATIVE.sm (27kb) downloaded 3 time(s).
Offline mkraska  
#25 Posted : 12 October 2023 16:42:18(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
In terms of readibility I'd prefer

ClearAll()
ClearVars()
ClearFunctions()

each returning 1 or 0.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 3 users thanked mkraska for this useful post.
on 13/10/2023(UTC),  on 12/10/2023(UTC),  on 14/10/2023(UTC)
Offline Davide Carpi  
#26 Posted : 02 November 2023 06:08:07(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Originally Posted by: mkraska Go to Quoted Post
In terms of readibility I'd prefer

ClearAll()
ClearVars()
ClearFunctions()

each returning 1 or 0.


Beta https://smath.info/en-US.../download/1.1.8705.36126 Beta

  • added ClearAllFunctions(1);
  • added ClearAllVariables(1);
  • removed options from ClearAll(1).
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 02/11/2023(UTC),  on 02/11/2023(UTC)
Offline mkraska  
#27 Posted : 02 November 2023 10:38:51(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

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.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#28 Posted : 02 November 2023 22:34:30(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Originally Posted by: mkraska Go to Quoted Post
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
thanks 1 user thanked Davide Carpi for this useful post.
on 02/11/2023(UTC)
Offline Davide Carpi  
#29 Posted : 04 November 2023 01:05:04(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Beta https://smath.info/en-US.../download/1.1.8707.26762 Beta (if the extensions gallery doesn't works, download the zip and drag&drop it into the canvas)

  • added ListFunctions(1);
  • added ListVariables(1);
  • fixed preprocessing in Zeros() and Ones().

Edited by user 04 November 2023 01:08:46(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
thanks 1 user thanked Davide Carpi for this useful post.
on 04/11/2023(UTC)
Offline edupa1087  
#30 Posted : 10 December 2023 11:15:39(UTC)
edupa1087

Rank: Newbie

Groups: Registered
Joined: 03/05/2021(UTC)
Posts: 2
Man
Ecuador
Location: Azuay

Originally Posted by: Davide Carpi Go to Quoted Post


Gracias
Users browsing this topic
Guest
2 Pages<12
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.