Author Topic: bug in commet line  (Read 4578 times)

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
bug in commet line
« on: May 30, 2012, 01:29:11 am »
Code
void HANGMAN::ClearScreen(){  //Clears the screen in radius {80,30}
    COORD homeCoord = {0,0};
   
    //{80,30} is enough to clear the previous game <- this line
    SetConsoleCursorPosition (hStdout, homeCoord);
    for (int row = 0; row < 30; row++){
        for (int col = 0; col < 80; col++){
            cout << ' ';
        }
    }
    SetConsoleCursorPosition (hStdout, homeCoord);
}

the combo of //{ , if your try to hide that function body, you will hide all of the .cpp file, and you cant get acces to the functions below ClearScreen().
If i make // { with a whitespace, everything will be ok, but without a whitespace it get bugged

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: bug in commet line
« Reply #1 on: May 30, 2012, 01:47:36 am »
Screen shot? (please use image sharing site, not the attachment feature of the forum).

Also please post some version information, my magic ball is pretty exhausted by now, no more mana is telling me...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: bug in commet line
« Reply #2 on: May 30, 2012, 02:48:24 am »
http://prikachi.com/images/909/4831909w.jpg here is with whitespace // {
http://prikachi.com/images/910/4831910z.jpg here is without whitespace //{

PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: bug in commet line
« Reply #3 on: May 30, 2012, 09:14:27 am »
Hm, this might be a feature of Scintilla to support regions and it might be buggy in 10.05 :)
Can you try a nightly build, because in my version r8020 it works way better.
The strange thing is that the ///@{ ///@}, the doxygen region markers, do not produce the same result.
Morten do you know something about this "feature"?

PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.
No, this is not a general programming forum ... try in stackover or comp.lang.c++ or comp.lang.c++.moderated.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: bug in commet line
« Reply #4 on: May 30, 2012, 10:43:36 am »
Yes, this is a special feature of scintilla. These regions help you to collapse parts of your code. wxSmith also makes use of this in a similar fashion. If you don't want that, make a space in between. There might also be an option to disable such regions, but I don't think its wise to apply this because this is really a nice feature (which I am using rather regularly btw...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ