Formatting comments on the same line as the code?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
PeterPanino
Posts: 5
Joined: Sat Feb 19, 2011 4:23 am

Formatting comments on the same line as the code?

Post by PeterPanino »

With the PHP code-formatter in WeBuilder 2010, how can I keep comments on the same line behind a code line? Like this:

Code: Select all

$random = rand(0, 100); // between 0 and 100 inclusive
The code formatter always changes the code to this:

Code: Select all

$random = rand(0, 100);
// between 0 and 100 inclusive
User avatar
garethjmsaunders
Posts: 65
Joined: Fri Dec 02, 2005 5:08 pm
Location: Anstruther, UK
Contact:

Re: Formatting comments on the same line as the code?

Post by garethjmsaunders »

I read this and thought "surely not...!" But I've just tested it and sure enough: it moves comments onto the next line.

That would be a nice-to-have feature to have the option to leave comments untouched when the PHP formatter runs.

Gareth
User avatar
notuo
Posts: 258
Joined: Sat Jul 09, 2005 8:07 pm
Location: Tlalpan, Mexico City, Mexico

Re: Formatting comments on the same line as the code?

Post by notuo »

PeterPanino wrote:With the PHP code-formatter in WeBuilder 2010, how can I keep comments on the same line behind a code line?
+1
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Formatting comments on the same line as the code?

Post by Gatis »

Thanks, I will write down this suggestion.

Gatis
Kind regards,
Gatis Avots
Post Reply