Line Numbering With Select Statements

0 Likes

Problem:

When instrumenting a project that contains compiler directives inside Select statements, Failsafe produces output that contains a syntax error.

Resolution:

This is a known bug with FailSafe, and we are currently working on a workaround.

An example that illustrates this problem follows :

----------------------

Select Case variable

#If 0 Then

Case 0

MsgBox "0"

#Else

Case 1

MsgBox "1"

#End If

End Select

-----------------------

Failsafe puts line numbers as follows :

----------------------

10 Select Case variable

#If 0 Then

Case 0

20 MsgBox "0"

#Else

30  Case 1

40  MsgBox "1"

#End If

50 End Select

-----------------------

The problem lies on Line 30.  In the case where the compiler directive is FALSE, line 30 is the first statement after the Select statement, and hence line numbers are not permitted in front of it.  So when attempting to compile, this generates a syntax error.

Old KB# 12155
Comment List
Anonymous
Related Discussions
Recommended