Author Topic: what is the purpose of //(* //*) symbol pattern  (Read 2242 times)

Offline almonj

  • Single posting newcomer
  • *
  • Posts: 2
what is the purpose of //(* //*) symbol pattern
« on: January 05, 2017, 06:58:38 pm »


I'm programming a wxWidgets project in code blocks and it inserts the symbol pattern //(* //*)   in a bunch of places and I don't understand what this does.

eg.

//(*IdInit(wxfileDialog)
const long wxfileDialog::ID_STATICTEXT1 = wxNewId();
const long wxfileDialog::ID_BUTTON3 = wxNewId();
const long wxfileDialog::ID_BUTTON1 = wxNewId();
const long wxfileDialog::ID_BUTTON2 = wxNewId();
const long wxfileDialog::ID_STATICLINE1 = wxNewId();
//*)

it looks like some kind of commenting thing but the code inside is functional. What is the purpose of this?

[/size][/font][/b]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: what is the purpose of //(* //*) symbol pattern
« Reply #1 on: January 05, 2017, 07:15:28 pm »
This is auto generated wxSmith code; the comments tell you NOT to edit code inside this block of code.

Edit: I do NOT use wxSmith myself; so, this is based on what I remember from past posts, I might be wrong.

Tim S.
« Last Edit: January 05, 2017, 08:05:45 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: what is the purpose of //(* //*) symbol pattern
« Reply #2 on: January 05, 2017, 08:18:09 pm »
//(* and //*) are single line comments they are not the same as /* and */. So the code between them is not commented out, but it is fully functional. wxSmith uses these comments to find section where to write its code.
(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!]