-
1
- #1
Mike Lewis
Programmer
When you want to explain a big chunk of code to someone, it's often helpful to add line numbers. The number don't form part of the executable code, of course, but they can be useful for pointing out particular lines.
You can see an example in thread184-1819595, in the post date-stamped "2 Dec 22 15:16". Here, I added line numbers so that I could point out particular difficulties with certain lines of code.
I've always wished that VFP had an automatic way of doing this. (If anyone knows of one, please post it here.) However, it's fairly easy to do in Notepad++ (and no doubt in other programmers' editors).
1. Select a zero-width column at the left edge of the code. To select a column, hold down the Alt key while you drag the mouse downward.
2. Go to Edit -> Column Editor.
3. In the resulting dialogue, select "Number to insert", and set the starting number and increment to 1 (or whatever other values you like).
If you find that selecting a zero-width column is tricky, you can indent each line and use the resulting white space as your column.
I hope this might be useful to some of you.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
You can see an example in thread184-1819595, in the post date-stamped "2 Dec 22 15:16". Here, I added line numbers so that I could point out particular difficulties with certain lines of code.
I've always wished that VFP had an automatic way of doing this. (If anyone knows of one, please post it here.) However, it's fairly easy to do in Notepad++ (and no doubt in other programmers' editors).
1. Select a zero-width column at the left edge of the code. To select a column, hold down the Alt key while you drag the mouse downward.
2. Go to Edit -> Column Editor.
3. In the resulting dialogue, select "Number to insert", and set the starting number and increment to 1 (or whatever other values you like).
If you find that selecting a zero-width column is tricky, you can indent each line and use the resulting white space as your column.
I hope this might be useful to some of you.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads