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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline ercuto  
#1 Posted : 14 December 2018 15:14:37(UTC)
ercuto

Rank: Newbie

Groups: Registered
Joined: 01/08/2018(UTC)
Posts: 2
Turkey
Location: Istanbul

Hi! I'm new here.

I've defined a parameter n at the beginning of the file and now I have decided to rename it. The problem here is there are many parameters that are expecting the n to be renamed as well in their own formulas. It will be tedious to revise them one-by-one. I wonder if there is a way to rename every n parameter easily. Thank you for your answers in advance.

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 14 December 2018 16:21:58(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)
Originally Posted by: ercuto Go to Quoted Post
I've defined a parameter n at the beginning of the file and now I have decided to rename it. The problem here is there are many parameters that are expecting the n to be renamed as well in their own formulas. It will be tedious to revise them one-by-one. I wonder if there is a way to rename every n parameter easily. Thank you for your answers in advance.


Parameters in formulas are just wild arguments. You just assign at the point of use.

Welcome to Smath Community ... Jean

Stat Treasury EDU.sm (160kb) downloaded 21 time(s).
Offline mkraska  
#3 Posted : 14 December 2018 16:32:15(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1124 time(s) in 721 post(s)
You can edit the .sm file with a text editor and try some smart search/replace. Probably you need regular expressions as otherwise e.g. search string "n" will have lots of spurious matches.

Within SMath, there is at least a search function (no replace yet).

Within a particular region, press F8 when cursor is on a name in order to edit all instances of that name in the given region.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#4 Posted : 14 December 2018 16:58:07(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1329 time(s) in 875 post(s)
In a region, you can use the F8 key an you'll be able to rename all local variables/functions at once.

Globally, you can do it with the Text Region Utilities plugin.

2018-01-20 08_36_27-SMath Studio - [Page1_].png
2018-01-20 08_36_54-SMath Studio - [Page1_].png
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 14/12/2018(UTC)
Offline ercuto  
#5 Posted : 14 December 2018 17:54:42(UTC)
ercuto

Rank: Newbie

Groups: Registered
Joined: 01/08/2018(UTC)
Posts: 2
Turkey
Location: Istanbul

Thank you all for smart solutions.
Offline Jean Giraud  
#6 Posted : 14 December 2018 18:48:31(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)
Originally Posted by: Davide Carpi Go to Quoted Post
In a region, you can use the F8 key an you'll be able to rename all local variables/functions at once.


F8 key does not support Some instances: example in multiple plot argument.
In that case you have to rename all plot arguments.
Users browsing this topic
Guest
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.