newLISP Fan Club

Forum => newLISP in the real world => Topic started by: vetelko on September 10, 2017, 12:29:06 PM

Title: Get line number of script line currently executed
Post by: vetelko on September 10, 2017, 12:29:06 PM
Hi guys,



is it possible to get line number which is currently executed in script? Somethin like:



(if error  (println $lineno))
;; something magical like $it :)

Thanks in advance.
Title: Re: Get line number of script line currently executed
Post by: rrq on September 10, 2017, 07:01:22 PM
If nothing else, you could perhaps use an expression reading counter (reader-event (fn (x) (inc $exprno) x))