Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren
Letzter Beitrag:
vor 4 Jahren, 12 Monaten
Beteiligte Autoren:
Al, Arnaud Benhamdine, roseman1986, Fabrice Harari

[WD18] Problem with find and replace using double quotes

Startbeitrag von Al am 21.07.2013 09:26

Hello All

The find and replace in WD18 has had many improvements but from my perpective appears to have one bad improvement.

In V16 a search for "DIR" would find exactly that - the letters DIR only where they were enclosed in double quotes.

In V18 the same search returns every occurance of DIR with and without the quotes and when it highlights the found items, it only colours the letters DIR not the quote marks so clearly it did not search for "DIR" but DIR

The only way to get it to find "DIR" is to use double quotes and search for ""DIR"".
This behaviour also affects the replace and before I realised that it required double double quotes, I managed to completely screw up some code where I did a replace of code that involved double quotes as it did not replace the quotes in the same way as it would have done in V16.

There was nothing in the V18 help to highlight the changed method.



Hi Al

to complete your mesage, I found out yesterday that if you search for several words (in my case, it was "is int", but WITHOUT the quote), it will find all the LINES in which there are both "is" and "int" even if they are not together, but NOT the line where there is ONLY "is" or ONLY "int"...

This behavior explains the bad experience I had with a SEARCH AND REPLACE where I wanted to replace all the "is int" by "is int on 8"....

If you have time and want to have fun, try it WITHOUT the quote... the result looks like the love child of a stutterer and a mad scientist... But make a backup before you do, please :-)

Now, I must say that there IS a (very small) "?" icon at the end of the search field that gives SOME indications... but clearly not enough as F1 doesn't seem to link to any specific help page.

But clearly, the search is much more powerfull, especially with the possibility to exclude words too...

Now it seems that the unit in which the search is done is the LINE of code... I haven't yet been able to determine if it is the physical or the logical line of code that is used (ie if multiline instructions (...) and multiline strings ([ ]) are seen/searched as one line or several...

Maybe someone else has made some other discoveries and would like to share them here?

Best regards

von Fabrice Harari - am 21.07.2013 13:12
Hello Fabrice.

It is a pity because the search and replace in V16 - although it could crash the IDE during a search - was completely reliable in terms of its functionality.

At the moment I find myself doing 2-3 searches on different parameters and I am too nervous to do a replace, I am doing them by hand. Thank goodness I am only doing a small project in V18.

Search and replace is a very basic developer tool and something we must have absolute confidence in. I would be just as happy to drop back to the functionality of V16 and do without the new options if they are not reliable.


von Al - am 21.07.2013 13:54
Hello All

The problem with searching for an item with double quotes has just bitten me again. I forgot about having to use double double quotes and did a search for "G" and about 3 minutes later the search system informed me that it had found 22,685 occurances of G, in fact there are only 3 instances of "G".
On the plus side the search is more robust than previous versions, as it didn't crash during this self imposed large search.


von Al - am 21.07.2013 23:04
Hello all,

I ran into a similar problem very recently : I tried to search for two consecutives double quotes (so : "") to make a search and replace, and, suprisingly, the search found nothing (although I had 2 ou 3 cases in y code).

I submitted the bug to PCS on June, 26th, and they gave me n°83 025.

Regards, Arnaud.

von Arnaud Benhamdine - am 22.07.2013 05:35
double quote is Caract(34) , so search for Caract(34)

//replace double quote " with -
PROCEDURE replace_str(str_tmp is UNICODE string)
str_tmp = Replace(str_tmp,Caract(34),"-")
RESULT str_tmp

von roseman1986 - am 26.07.2013 15:47
double quote is Caract(34) , so search for Caract(34)

//replace double quote " with -
PROCEDURE replace_str(str_tmp is UNICODE string)
str_tmp = Replace(str_tmp,Caract(34),"-")
RESULT str_tmp

Roseman, the previous posts were related to the search panel in Windev IDE, not the function Replace(). So the code you proposed can NOT be usable, because it would be applied on windev code.

von Arnaud Benhamdine - am 27.07.2013 20:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.