Commit 317c8479 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-01-31 23:38:57 by beppe] Empty log message

Original author: beppe
Date: 2004-01-31 23:38:57+00:00
parent 15bc5062
......@@ -9,6 +9,7 @@
<include file="tutorial/overloading.xml"/>
<include file="tutorial/patterns.xml"/>
<include file="tutorial/errors.xml"/>
<include file="tutorial/queries.xml"/>
<include file="tutorial/higherorder.xml"/>
<left>
<p>
......
......@@ -56,7 +56,7 @@ code by defining a body that skips the check of the tags:
<p>
However this optimization would be useless since it is already done by the
implementation (see ???) and, of course, it
implementation (for technical details see <a href="http://www.cduce.org/papers/reg.pdf">this paper</a>) and, of course, it
would make the code less readable. If instead of extracting the list of
<i>all</i> parents we wanted to extract the sublist containing only
parents with exactly two children, then we had to replace <code>transform</code> for <code>map</code>:
......
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="tutorial_queries">
<title>Queries</title>
<left>
<boxes-toc/>
<p>
You can cut and paste the code on this page and
test it on the <a href="cgi-bin/cduce">online interpreter</a>.
</p>
</left>
<box title="Select from where" link="sel">
<p>
CDuce is endowed with a <code>select_from_where</code> syntax to perform some SQL-like queries. The general form of select expressions is
</p>
<sample><![CDATA[
select %%e%% from
%%p1%% in %%e1%%
%%p2%% in %%e2%%
:
%%pn%% in %%en%%
where %%b%%
]]></sample>
<p>
where <code>%%e%%</code> is an expression <code>%%b%%</code> a boolean expression, the <code>%%pi%%</code>'s are patterns, and the <code>%%ei%%</code>'s are sequence expressions.
</p>
<p>
<b style="color:#FF0080">TO BE DONE (XPATH-like syntax and examples)</b>
</p>
</box>
</page>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment