Pages: [1]   Go Down
Author Topic: Line Numbers  (Read 1179 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the IDE should have a line number option under Tools or View. Also, this option should be available in the Serial Monitor, too.

For some reason in the IDE, I can't Cut/Copy and Paste to gedit. The OS is Ubuntu 10.04. However, I can do so in Open Office Word. I can go the other way, that is Paste into the IDE from gedit. Selecting Use External Editor doesn't help. Very strange.

How do I use Copy for Forum?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33402
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I think the IDE should have a line number option under Tools or View.
It does, look at the bottom left hand corner of the IDE window, that number is the line number.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 38
Turn it off!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wise guy...  Line numbers on every line, like any normal programming editor.  It makes finding errors listed by line number much faster.  I don't know why this hasn't been incorporated yet.  It's been asked for for a lone time.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12774
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't know why this hasn't been incorporated yet.  It's been asked for for a lone time.

I suspect the Arduino community would greatly appreciate your adding this feature.  I'll get you started...

Download the latest source code...
https://github.com/arduino/Arduino

Prepare a development environment...
http://code.google.com/p/arduino/wiki/BuildingArduino

Add the feature.

And create a pull request...
https://github.com/arduino/Arduino/pulls
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 38
Turn it off!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hehe, it would be best you don't temp me.  That kind of coding is best left to people who have an idea of what they're doing when it comes to non-embedded programming.

I did forget that the Arduino guys don't like to make major changes to the editor, and leave that mostly to the Processing crowd.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6652
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Line numbers on every line, like any normal programming editor.
I haven't used a programming editor that shows line numbers since SPF on IBM mainframes in the early 1980s.
And SOS on DEC mainframes in the same timeframe, but that wasn't a "display" editor.  :-)
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1643
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's not an off-the-wall request.  If the compiler errors out and says "filename @ line number so and so has an error", it's not silly to expect to see a line number somewhere in the editor.  For an environment that caters to the uninitiated... this should not be a ridiculous idea to the dev's.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6652
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If the compiler errors out and says "filename @ line number so and so has an error", it's not silly to expect to see a line number somewhere in the editor.
True.   But there already is a line number "somewhere in the editor" (lower left corner), AND the IDE already attempts to reposition/highlight to the  line with the error...

It would be nice if the line numbers were more accurate.  Thanks to the pre-processing done by the IDE, the line numbers in the compiler error messages don't always match the actual line numbers (it attempts to correct, but doesn't always succeed.)

It would also be nice if C compilers had parsers that were more capable of recovering from errors so that they could could on to  (reliably) detect more errors in the same file.  But this seems to be genuinely difficult :-(
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use an external editor with linenumbers, I often use notepad++ (but not primary for the linenumbers). Check IDE-> File menu -> preferences

Errormessages 99% refer to lines just edited that's the part probably open in the editor anyway, so linenumbers are not so informative. Furthermore the linenumber in the errormessage is the place where the compiler gave up parsing (syntax level!). too often the real error occurred a few lines before - even in that just included new.h file smiley-sad
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: