[xquery-talk] incorrect syntax?

David Carlisle davidc at nag.co.uk
Tue Oct 2 01:30:07 PDT 2012

On 02/10/2012 08:56, Andrew Welch wrote:
> ha that's great (if a little contrived):
> declare default function namespace "x";
> declare function return ($x) { $x+1 };
> return (23)
> returns 24

Yes that is contrived, I think it's clearer if you write it like this

declare default function namespace "return";
declare variable $return := 23;
declare function return ($return) { $return+1 };
return ($return)

The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

More information about the talk mailing list