1

I had the following vb.net code in my question How to send a PCF Message under syncpoint?:

Try
    ' use PCF to get queue information.
    Dim agent As New PCFMessageAgent(qmgr)
    Dim request As New PCFMessage(CMQCFC.MQCMD_INQUIRE_Q)
    request.AddParameter(MQC.MQCA_Q_NAME, queueName)

    Dim responses As PCFMessage() = Nothing

    Try
        responses = agent.Send(request)
    Catch pcfex As PCFException
        LogException(pcfex, {queue}, "Exception checking queue availability via PCF. Assuming false")
        Return Nothing
    End Try

    If responses IsNot Nothing AndAlso responses.Any() Then
        ' connected
        LogDebug("Checking queue availability for " & queue.ToString() & " returned a PCF result.")
        return responses
    Else
        LogError("No result returned from PCF Message request on " & queue.ToString())
        Return Nothing
    End If
Catch ex As MQException
    LogException(ex, {queue})
    Return False
End Try

As you can't see, weirdly, the comments cause issues with the formatting - but in my question it did. Here, on the other hand, it seems to be displaying no formatting at all. You'll have to view the edit history in my question to see the issue, then.

2
  • Unfortunately, you edited your question during the five-minute grace period, so it doesn't have any history we can see. Commented Nov 17, 2015 at 11:39
  • 3
    I don't see formatting issues with this post. But your question doesn't have a vb tag, it might be picking up the wrong language syntax highlighting.
    – Mat
    Commented Nov 17, 2015 at 11:42

1 Answer 1

1

As you can see from my edit to your question, syntax highlighting works perfectly fine with commented lines.

Since we couldn't see your problem as you edited out within the 5 minute grace period, I recreated it for illustration purposes enter image description here

Mat's suggestion was exactly right, the syntax highlighter was confused and had no idea what language you were using. Normally this is picked up from the language tag, but since you only had , it did not apply the visual-basic syntax highlighter.

I added the appropriate syntax highlighting for you and now the post looks like it is supposed to, but if you added the , that would have also worked.

You can read more about the syntax highlighting in What is syntax highlighting and how does it work?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .