<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><i>&gt; &gt; cut Last 5 15

&gt; Oh, I wasn't aware that this variant of the cut command exists at all.  Where did you find it?</i>

It's mentioned on page 19 in the CQP tutorial (<a class="moz-txt-link-freetext" href="http://cwb.sourceforge.net/files/CQP_Tutorial.pdf">http://cwb.sourceforge.net/files/CQP_Tutorial.pdf</a>).
<i>
&gt; My suggestion would be to

&gt; 1) disallow negative values for &lt;A&gt; and &lt;B&gt; as indices from the end – or does anybody actually use them?</i>

As far as I can tell the current implementation of negative indices is broken:

  if (first &lt; 0) first = n_matches - first;
  if (last &lt; 0) last = n_matches - last;

Since first/last are negative numbers, the subtractions above result in additions, so index -3 in a query with 10 results actually translates to index 13, leading to an error. I guess that means you can safely assume no one has been using the negative indices.

<i>&gt; 2) clamp the specified range to the query size, possibly issuing a warning if start or end are out of range</i>

Sounds good to me, as long as it also means that we get an empty result when both start and end are out of range (just like with 'cat').

Martin
</pre>
  </body>
</html>