lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Thadeus:

On Sun, 20 Aug 2023 at 22:57, Thadeu de Paula <arkt8@proton.me> wrote:
> As I  said, I can manage to repeat the variable each line.
Missed that, sorry.

> I can comprehend the statements, but being not one function call, but distinct ones, the correct line where a call tooks place should be considered or the trace has no meaning. Not less not more. We need to put things as they are, not liveable undocumented workarounds.

I've dug a bit in the docs and I see the wording is confussing,
"currentline: the current line where the given function is
executing.", which leads to your expectations.

I do not know the exact cause for this in lua. In some mini languages
I have done this kind of thing appeared because full-statement
collecting occurred early, and I only had one line after that ( I
could have stored more line info, but I deemed it an unnecessary
complication ). I suppose something similar happens in lua.

I would try to solve the ambiguity by doc-patching anyway, although
defining the execution line is complex ( in things like loops when
looping etc.. ). I am used to that and do not thing the extra
bug-surface introduced by the detailed accounting is worthwile.

Francisco Olarte.