Menu

#1270 Codeblocks One Line Comment Bug

Undefined
invalid
nobody
None
Bug_Report
2022-05-19
2022-05-18
Jan Girke
No

Name : Code::Blocks
Version : 20.03-r11983
SDK Version : 2.0.0
Scintilla Version: 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org

wxWidgets Library (wxMSW port)
Version 3.1.3 (Unicode: wchar_t, debug level: 1),
compiled at Nov 1 2019 18:53:26

Runtime version of toolkit used is 10.0.

void loadImages()
{
hLogoImage = (HBITMAP)LoadImageW(NULL, L".\Logo.bmp", IMAGE_BITMAP, 100, 100, LR_LOADFROMFILE); // myDir\
hGenerateImage = (HBITMAP)LoadImageW(NULL, L".\Generate.bmp", IMAGE_BITMAP, 100, 100, LR_LOADFROMFILE);
}

The one line comment after the "LR_LOADFROMFILE);" changes the next line into a comment.

1 Attachments

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2022-05-18
    • status: open --> invalid
     
  • Miguel Gimenez

    Miguel Gimenez - 2022-05-18

    That is expected behaviour, see thia for example:

    "Whenever backslash appears at the end of a line (immediately followed by the newline character), both backslash and newline are deleted, combining two physical source lines into one logical source line. If your current line is a single line comment, following line would be digested in continuation as a comment."

     

    Last edit: Miguel Gimenez 2022-05-18
  • Jan Girke

    Jan Girke - 2022-05-19

    How can I turn that off?
    It automatically deletes a space.

     
  • Miguel Gimenez

    Miguel Gimenez - 2022-05-19

    Spaces are removed also when preprocessing. Put the path inside brackets, or append a space and a dot or hyphen (for example) after the backslash, or insert an empty line after the comment

     

Log in to post a comment.

MongoDB Logo MongoDB