It is currently Thu Oct 24, 2019 5:38 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [4.50] IDE Find does not find everything...
PostPosted: Sat Jul 24, 2010 5:16 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Feb 09, 2006 11:27 pm
Posts: 2443
When I did a search for "whole words only", the IDE didn't jump to all occurencies of "OptReportGSize" in the following code:
Code:
OptReportGSize=1
y=OptReportG*OptReportGSize
Debug OptReportGSize


Seems to be a bug, isn't it?


Top
 Profile  
Reply with quote  
 Post subject: Re: [4.50] IDE Find does not find everything...
PostPosted: Sat Jul 24, 2010 6:52 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3680
Location: Berlin, Germany
I stumbled across the same issue some time ago, and almost forgot about it.
In your code above, OptReportGSize is not found in the 2nd line. In the code below I added another line, where it isn't found either.

Code:
OptReportGSize=1
y=OptReportG*OptReportGSize
Debug OptReportGSize
Debug @OptReportGSize

In my opinion, it's a bug.

Regards, Little John

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: [4.50] IDE Find does not find everything...
PostPosted: Sat Jul 24, 2010 7:52 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
When double-clicking the word in order to select it, it selects 'OptReportG*OptReportGSize' and '@OptReportGSize' respectively instead of just OptReportGSize.
(in other words, it seems that those ones are the whole words according to the IDE)

Whether it is a bug in the Find-function or IDE - if it is a bug at all - is not up to me to decide :mrgreen: :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: [4.50] IDE Find does not find everything...
PostPosted: Sat Jul 24, 2010 8:49 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3680
Location: Berlin, Germany
This is the problem from my point of view:

Imagine we have the following code
Code:
Abc = 1
y = 3*Abc
Debug y
Debug @Abc

myAbc = 1
y = 3*myAbc
Debug y
Debug @myAbc

and then we want to rename variable Abc to Xyz, but we do not want to rename variable myAbc to myXyz.
I.e. when replacing Abc with Xyz, we have to chose the option
[v] whole words only.

After doing the Search/Replace in the IDE, the code looks like this:
Code:
Xyz = 1
y = 3*Abc
Debug y
Debug @Abc

myAbc = 1
y = 3*myAbc
Debug y
Debug @myAbc

The second part (concerning variable myAbc) remained unchanged as intended and expected. OK.

But in the first part, in two cases (line 2 and line 4) Abc has not been replaced with Xyz. So the code works differently than it did before renaming the variable. This should not happen IMHO. To me it is obvious, that in such a situation the user wants to rename all occurrences of Abc, i.e. also those in the second line and in the fourth line.

Regards, Little John

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye