The behaviour of indentation, where there is line-continuation, depends on whether the comment is a line-appended comment, or on a line of its own. I'd more or less agree with Barry's synopsis, but just to make that distinction, which I didn't see mentioned and apologies if anyone did.
End-of-Line (appended comments) are properly ignored and therefore the indentation remains (example 1) since there is a comma after NMITEMACTIVATE. A comment occupying a line of its own however,
breaks that continuation, (as indeed does an empty line) hence the indentation being reset to level 2 (example 2).
(1)
Code: Select all
Procedure winResultsCB( hWnd, iMessage, wParam, lParam )
Protected col,
*nmhdr.NMHDR,
*nmitem.NMITEMACTIVATE, ; Comment
retval = #PB_ProcessPureBasicEvents
Debug retval
EndProcedure
(2)
Code: Select all
Procedure winResultsCB( hWnd, iMessage, wParam, lParam )
Protected col,
*nmhdr.NMHDR,
*nmitem.NMITEMACTIVATE,
; Comment
retval = #PB_ProcessPureBasicEvents
Debug retval
EndProcedure
Likewise, as I mentioned, an empty line also resets :
Code: Select all
Procedure winResultsCB( hWnd, iMessage, wParam, lParam )
Protected col,
*nmhdr.NMHDR,
*nmitem.NMITEMACTIVATE,
retval = #PB_ProcessPureBasicEvents
Debug retval
EndProcedure