473,320 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Results different in Output window than Immediate Window

I'm getting different results when I display a value in
the Output window as opposed to the Immediate window.
Why?

Code to recreate problem:

'Purpose: Get different results from Output
window than Immediate
' window.

Dim sInput As String = Chr(48) & Chr(48) & Chr
(48) & Chr(0) & Chr(0) & Chr(48)
Dim sExpression As String
Dim m As Match
Dim re As Regex

'Pull everything but the garbage on the end.
sExpression = "(?<fieldvalue>.+\w+)(?
<garbage>\W*)"
re = New Regex(sExpression)
m = re.Match(sInput)
If m.Success Then

'Debug.writeline returns "6".
Debug.WriteLine(Now.ToString & " length is "
& m.Result("${fieldvalue}").Length)

'Set a breakpoint on the Beep.
'Run "? m.Result("${fieldvalue}").Length) in
the
'Immediate window.
'I get "3". Why different than "6" above?
Beep()
Else
MessageBox.Show("Something went way wrong.")
End If

End Sub

Jul 21 '05 #1
2 2883
I'm getting different results when I display a value in
the Output window as opposed to the Immediate window.
Why?


The debugger doesn't handle strings containing null characters
correctly.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #2
Hi Dave,

This is a known issue. The problem lies in the debug API and will not be
fixed.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

--------------------
| Content-Class: urn:content-classes:message
| From: "Dave" <dv****@5280Solutions.com>
| Sender: "Dave" <dv****@5280Solutions.com>
| References: <05****************************@phx.gbl>
<O7**************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Results different in Output window than Immediate Window
| Date: Tue, 7 Oct 2003 07:32:55 -0700
| Lines: 24
| Message-ID: <10****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: quoted-printable
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOM3+WYnwizbvMpQW2c8VG8bGtJIA==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:111033
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks!
| Anyone know when a fix will be available?
| >-----Original Message-----
| >
| >>I'm getting different results when I display a value in
| >>the Output window as opposed to the Immediate window.
| >>Why?
| >
| >The debugger doesn't handle strings containing null
| characters
| >correctly.
| >
| >
| >
| >Mattias
| >
| >--
| >Mattias Sjögren [MVP] mattias @ mvps.org
| >http://www.msjogren.net/dotnet/
| >Please reply only to the newsgroup.
| >.
| >
|

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roger | last post by:
Are these two features available in VS.Net 2003 at all (maybe different keys)... F4 to go thru find-in-files search results (just like you F4 to go thru build errors). In VC6, if output window...
4
by: John A Grandy | last post by:
while stepping through code i'd like to dynamically see the output of my debug.writeline() statements as they are executed ... but the debug > windows > immediate doesn't show it
2
by: Dave | last post by:
I'm getting different results when I display a value in the Output window as opposed to the Immediate window. Why? Code to recreate problem: 'Purpose: Get different results from Output...
3
by: Russell Stevens | last post by:
Can anyone tell me how to get to the immediate window in VS2005. The help file says (when debugging) to click Debug, Windows, Immediate. There is no Immediate window listed there, nor anywhere else...
9
by: David A. Beck | last post by:
When I do a debug.print("blabla") in VB (VS2005) it doesn't show up in the output window, what gives?
2
by: dgk | last post by:
Using VS2005 Standard Edtion, I have an Immediate window during ASP debugging. My co-worker, using VS2005 Team Edtion does not have an Immediate window. He does have a Command window, which is sort...
5
by: Bob | last post by:
I'm not sure why this is happening. Using Access 2003. My code is as follows... Private Sub Command1_Click() Dim strSourceFile As String Dim strDestinationFile As String strSourceFile =...
1
kirubagari
by: kirubagari | last post by:
rivate Sub cmdscan_Click() Const a As Byte = 4 Const b As Byte = &HFF Dim I As Long Dim AnyChanged As Boolean Dim changeMade As Boolean Dim value As Byte Dim x Dim tmp As String
1
by: Primo | last post by:
I have 3 files and I want all of them to go to the bank and one of them will go to both the bank and a vendor. this is a code we have: <process name="FD_Generic_Outbound_banksplit"> ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.