Artur seems to have some problems with this list, so I'm copy-pasting his message. In the meantime, I'll try to see what's wrong with the mailing list server.

-------- Forwarded Message --------
Subject: Lag specification with "to" keyword fails for passed list parameters in functions
Date: Fri, 22 May 2026 10:26:10 +0200
From: Artur T. <artur.tarassow@gmail.com>
Reply-To: artur.tarassow@gmail.com
To: Gretl development <gretl-devel@gretlml.univpm.it>


Hi all,

I've encountered what appears to be a bug (or unsupported feature) when using
lag specifications with the "to" keyword inside functions when referring to a
passed list parameter.


The following code produces an error: "The symbol 'to' is undefined"

<hansl>
set verbose off
open denmark.gdt --quiet

function void foo(list D)
list L = LRM D.LRM(-1)
L += D.LRM(-2 to -4) # Error: "The symbol 'to' is undefined"
end function
foo(dataset)
</>


The "to" keyword fails specifically when used with lag specifications on passed
list parameters inside functions.


Is this a known limitation, an unimplemented feature, or an actual bug? Is it a
parsing problem specific to how gretl handles lag syntax within function
contexts.


Thanks
Artur
-- 
-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------