www.digitalmars.com         C & C++   DMDScript  

D - [BUG?] D reporting the wrong line number

reply J Anderson <REMOVEanderson badmama.com.au> writes:
With a particular file (sorry I can't send it), D reports the wrong line 
number. I looked in a different program to discover the problem.  D 
counts a ASCII 13 followed by 10 as an enter.  Some editors also treat 
just ASCII 10 as an enter.  I don't know if this is a problem to fix in 
D or the editor (DIDE), but I think it would help prevent newbie 
problems if 10 by-it-self was treated as an enter (and parhaps 13) by 
the compiler.

-Anderson
Dec 16 2003
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bro9jl$5fs$1 digitaldaemon.com...
| With a particular file (sorry I can't send it), D reports the wrong line
| number. I looked in a different program to discover the problem.  D
| counts a ASCII 13 followed by 10 as an enter.  Some editors also treat
| just ASCII 10 as an enter.  I don't know if this is a problem to fix in
| D or the editor (DIDE), but I think it would help prevent newbie
| problems if 10 by-it-self was treated as an enter (and parhaps 13) by
| the compiler.
|
| -Anderson
|

From dcompiler.html:
"
Bugs
These are some of the major bugs:
. The compiler quits on the first error, and sometimes gets the line number
wrong.
...
"

-----------------------
Carlos Santander Bernal


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15
Dec 16 2003
parent J Anderson <REMOVEanderson badmama.com.au> writes:
Carlos Santander B. wrote:

"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bro9jl$5fs$1 digitaldaemon.com...
| With a particular file (sorry I can't send it), D reports the wrong line
| number. I looked in a different program to discover the problem.  D
| counts a ASCII 13 followed by 10 as an enter.  Some editors also treat
| just ASCII 10 as an enter.  I don't know if this is a problem to fix in
| D or the editor (DIDE), but I think it would help prevent newbie
| problems if 10 by-it-self was treated as an enter (and parhaps 13) by
| the compiler.
|
| -Anderson
|

From dcompiler.html:
"
Bugs
These are some of the major bugs:
.. The compiler quits on the first error, and sometimes gets the line number
wrong.
....
"

-----------------------
Carlos Santander Bernal

  

pretty easy to fix (I mean by the time you wrote the bug report, you could have fixed it). I also noticed that // comments where treated as separate lines when it was char 10, so it's reading the lines properly, just not remembering them for debug output.
Dec 16 2003