---------- Oorspronkelijk Bericht ---------- Van: Rob Stapper <r.stapper@lijbrandt.nl> Aan: Christian Grün <christian.gruen@gmail.com> Datum: 19-10-2020 10:01 Onderwerp: RE: [basex-talk] recursively used variables
Good Morning Christian,
Yes, I was wondering if you had received my mail. This time lapse is so not like you.
Thanx for having a look. It would be great if this worked, implementing inheritance-like structures would be so much more transparent.
Have a look at the attachment if you like. Recursion here does not work and a work-around would brake down the systematic approach.
Best,
Rob
Sent from Mail https://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Christian Grün mailto:christian.gruen@gmail.com Sent: Sunday, October 18, 2020 4:08 PM To: Rob Stapper mailto:r.stapper@lijbrandt.nl Cc: basex-talk@mailman.uni-konstanz.de mailto:basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] recursively used variables
Hi Rob, sorry, I’ve just discovered your mail in the basex-talk archive. I believe that the given query should not raise an error as the variable does only reference your function. Let’s see what we can do. – Best, Christian
On Thu, Oct 8, 2020 at 2:17 PM Rob Stapper <r.stapper@lijbrandt.nl mailto:r.stapper@lijbrandt.nl > wrote:
> >
Hi,
The code[1] below and send as attachment generates a error message: “Static variable depends on itself: $Q{http://www.w3.org/2005/xquery-local-functions}test http://www.w3.org/2005/xquery-local-functions%7Dtest ”.
I use these variables to refer to my private functions in my modules so I can easyly refer to them in a inheritance situation.
It’s not a big problem for me but I was wondering if the error-triggering is justified or that it should work.
[1]===========================================
declare variable $local:test := local:test#1 ;
declare %private function local:test( $i) { if ( $i > 0) then $local:test( $i - 1) } ;
$local:test( 10)
===========================================
Kind regards,
Rob Stapper
Sent from Mail https://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaig...
Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaig...
>
mvgr. Rob Stapper