This works great!

On Tue, Nov 30, 2010 at 9:30 AM, Scott Henninger <[email protected]
> wrote:

>  Hello Tim;  The SPARQL standard does not support arithmetic operators
> beyond =, -, *, / (numeric division) and unary + and -.  For mod/div, the
> best bet is to use SPINx and use JavaScript definitions.  See Help > SPIN >
> Using JavaScript to define SPIN/SPARQL Functions.
>
> The attached file defines two functions basicMath:mod() and
> basicMath:div().  Place these files anywhere in your workspace and refresh
> SPARQLMotion functions, and you can call the functions with LET or FILTER
> clauses:
>
> FILTER ((basicMath:mod(?x, ?y) = 0))
> LET (?value := basicMath:div(?x, ?y))
>
> You don't need to import the file to use them - the .sms files will be
> scanned at Composer/Live startup and globally available across all files in
> the workspace.
>
> -- Scott
>
> On 11/30/10 8:31 AM, Tim Darr wrote:
>
> Are the mod and div operators available in TBC (for SPARQL queries)?
> If so, what is the namespace and syntax?
>
> -Thanks-
>
>
>   --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid
> Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]<topbraid-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
>



-- 
Tim Darr
[email protected]

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to