struct Location size

Basile B. b2.temp at gmx.com
Thu May 11 11:50:47 UTC 2023


On Thursday, 11 May 2023 at 09:31:16 UTC, Commander Zot wrote:
> On Wednesday, 10 May 2023 at 17:57:17 UTC, Basile B. wrote:
>> On Wednesday, 10 May 2023 at 16:09:53 UTC, Commander Zot wrote:
>>> how often do you need the _exact_ column? or to rephrase it, 
>>> wouldn't column divided by 2 or 3 be good enough to figure 
>>> out where an error happened?
>>
>> The column is needed in every error message when the option 
>> `-vcolumns` is activated. It really has to be the right number.
> I know that it does that, but is there a reason it has to be 
> the exact column other than "we specified it to be that way".

The column is useful for IDEs, for example after a failed 
compilation it allows to accurately syntax highlight with a wavy 
red underline the right identifier in a chain that contains one 
error, instead of the whole chain.

Otherwise and presumably, formatters can use the information too.

> for usecase is there for it? because if it's just to print the 
> line where the error happened, it really doesnt matter if you 
> start/end one or two chars earlier.
>
> but in case it is needed, then limiting it to 64 is also not an 
> option.




More information about the Digitalmars-d mailing list