Author |
Topic |
|
mspa
Senior Member
Netherlands
44 Posts |
Posted - Mar 14 2005 : 04:53:25 AM
|
Consider the piece of code below:
string strQueryName = LastUsedQuery.Replace(' ', '_').Replace('/','_').Replace('\\\\','_'); The first Replace() call is colored like a method, however the following Replace() calls are colored like macro's. |
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 14 2005 : 4:44:42 PM
|
for me using .NET 2003, C++ and VAX 1297 all three calls to Replace() are being coloured as functions.
which IDE and version of VAX are you using? does this happen in other places in your code? this effect could be being triggered by the local context. |
zen is the art of being at one with the two'ness |
|
|
mspa
Senior Member
Netherlands
44 Posts |
Posted - Mar 15 2005 : 05:29:59 AM
|
I am also using .NET 2003 but programming in C# and VAX 1298. I have checked and it doesn't happen when I place this code in a class scope, but it does happen in a method scope. |
|
|
RMdata
Junior Member
17 Posts |
Posted - Mar 15 2005 : 12:45:30 PM
|
I have noticed this in C# also. It seems to happen when recursively calling the same method on the previous results, especially involving the string class.
Open any project in C#, and do what mspa was doing to replicate the problem:
string test = "Hello there".Replace(' ', '_').Replace('/','_').Replace('\\\\','_');
--- Mark.
VA_X.dll file version 10.1.1298.0 Licensed to: VA X: [email protected] (1-user license) Support ends 2006.01.17 VAOpsWin.dll version 1.2.0.4 DevEnv.exe version 7.10.3077.0 msenv.dll version 7.10.3077.0 Font: Courier New 13(Pixels) Comctl32.dll version 5.82.2900.2180 WindowsNT 5.1 Build 2600 Service Pack 2 Single processor
Platform: Win32 Stable Includes: c:\\program files\\microsoft visual studio .net 2003\\vc7\\include; c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\include; c:\\program files\\microsoft visual studio .net 2003\\vc7\\PlatformSDK\\include\\prerelease; c:\\program files\\microsoft visual studio .net 2003\\vc7\\PlatformSDK\\include; c:\\program files\\microsoft visual studio .net 2003\\sdk\\v1.1\\include;
Library Includes: c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\src\\mfc; c:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\src\\atl; c:\\program files\\microsoft visual studio .net 2003\\vc7\\crt\\src;
Other Includes:
|
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 20 2005 : 4:00:25 PM
|
confirmed using C#. it seems that the underscores are the problem, not the multiple function calls. i get different results with:
string test = "Hello there".Replace(' ', '_').Replace('/','_').Replace('\\\\','_');
string test = "Hello there".Replace('a', 'b').Replace('c','b').Replace('d','b');
string test = "Hello there".Replace(' ', '_').Replace('a','_').Replace('b','_');
string test = "Hello there".Replace(' ', '_').Replace('_','_').Replace('b','_');
case=529 |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|