Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find line number in script ?

Status
Not open for further replies.

bolobaboo

MIS
Aug 4, 2008
120
US
Hi
I have big script and during run time it throws error at line 100. How to figure out which would be line 100th ? There is hard way which count one by one, it would be easir if there is short cut.

Thank you in advance.
 
The easiest way is to use a text editor such as Notepad++
which will automatically number the lines for you when you edit your script.
Notepad++ is free to download from the internet, and works well.
 
Most text editors will show you the current line number in the status area (bottom of the application).

If you are using notepad.exe, click View > Status Bar. Also, press CTRL-G to go to a specific line number.
 
I used to use Notepad for editing scripts, until I discovered Notepad++.
Yes Notepad will tell you what line you are on, (If you turn off Word Wrap), but it does not display all of the line numbers.
Notepad++ gives you the option of selecting the language, such as plain text or VB for example. If you select VB it will display comments and keywords using different colors and fonts, for example.
It reallys makes the code much easier to read, at least for me it does.
I am not trying to promote Notepad++, there are other text editors to choose from; it just happens to be the one that I use and like. Especially since it is free:)
I would never go back to Notepad, and highly recommend that anyone still using it for writing scripts, check out some of the alternatives available.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top