BUG: Device Does Not Recognize Line Continuation Characters in eVB Code (266125)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q266125

SYMPTOMS

The device interprets line continuation characters ("_") in the code as one line, whereas the Integrated Development Environment (IDE) interprets them as multiple lines. If you use one line continuation character in the IDE, the execution point is one line above the related breakpoint that is set in the code.

CAUSE

This problem results from the difference between the screen line and the logical line. The screen line is the actual code in the module that you see. The logical line is one complete executable line that the compiler generates. Thus, if you use the line continuation character to break the code into multiple lines, logically it is still considered only one line.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new project that targets any device in eMbedded Visual Basic (eVB). The following example uses a PocketPC project. Form1 is created by default.
  2. Add the following code to Form1:
    Option Explicit
    
    Private Sub Form_OKClick()
        App.End
    'These lines are optimized to one line on the device,
    'while they still exist (as four lines) in the IDE.
        TestSub extra1, _
               extra2, _
               extra3, _
               extra4, _
               extra5
    End Sub
    
    Sub Form_Click()
        Dim extra1, extra2, extra3, extra4, extra5
            extra1 = 1  'Execution point is seen here (4 lines off).
            extra2 = 2
            extra3 = 3
            extra4 = 4
            extra5 = 5  'Set a breakpoint here.
    End Sub
    					
  3. Set a breakpoint on the following assignment statement:
    extra5 = 5
    					
  4. Press the F5 key to run the project.
  5. Click on the form. Notice that the execution point is four lines off from the breakpoint.

Modification Type:MajorLast Reviewed:9/4/2002
Keywords:kbbug kbDSupport KB266125