By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,654 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,654 IT Pros & Developers. It's quick & easy.

how do I copy the code with line numbers

P: 1
I am trying to copy my code with line numbers, but when I select all and right click the code there is no option copy in html. can you help, thank you?
Dec 15 '10 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 9,197
Line numbers are not part of the code so there's nothing to copy. Just copy your selection and add the line numbers to the copy but realize that it won't compile any longer.
Dec 15 '10 #2

Expert 100+
P: 2,400
I assume you are asking how to post source code in this forum.

Look here. A short-cut technique is to paste the lines of code (with no line numbers), select the lines of code, and then press the # button at the top of the post-entry window.

Notice that line numbering in your post always starts from 1, so line numbers in your post are typically different than line numbers in your actual source code. Compiler messages typically indicate the relevant line number. It is very helpful if you somehow indicate which line in your post corresponds to the line indicated in the message. You can use the Preview button to see what line numbers will be seen by people reading your post.
Dec 15 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.