Simply, change:
if not none? [ select grp tc ] [
print rejoin [ tc "-" first grp ]
]
To:
if select grp tc [
print rejoin [ tc "-" first grp ]
]
-Carl
At 4/18/02 10:56 PM +0200, you wrote:
>I want the first element to be printed only if the value if tc is found in the block,
>therefore if tc = 05 it should print tcgrp01, if 06 prints tcgrp01, if 02 prints
>tcgrp02.
>
>If not found nothing should print.
>
>Is it clear enough ?
>
>
>----Message d'origine----
> >De: "Gregg Irwin" <[EMAIL PROTECTED]>
> >A: <[EMAIL PROTECTED]>
> >Sujet: [REBOL] Re: none? ???
> >Date: Thu, 18 Apr 2002 10:43:42 -0600
> >
> >Hi Richard,
> >
> ><<...In order to test if tc is included in the block. If so, it should print
> >the first element of the sub block.
> >
> >Currently, it always prints the first element. Why ? >>
> >
> >I haven't had my coffee yet this morning so I'm not clear on exactly what
> >isn't working for you. I ran things here (manually putting the data in
> >texte) and I got the following results:
> >
> >05-tcgrp01
> >05-tcgrp02
> >05-tcgrp01
> >05-tcgrp02
> >05-tcgrp01
> >05-tcgrp02
> >05-tcgrp01
> >05-tcgrp02
> >05-tcgrp01
> >05-tcgrp02
> >05-tcgrp01
> >05-tcgrp02
> >25-tcgrp01
> >25-tcgrp02
> >25-tcgrp01
> >25-tcgrp02
> >25-tcgrp01
> >25-tcgrp02
> >25-tcgrp01
> >25-tcgrp02
> >25-tcgrp01
> >25-tcgrp02
> >06-tcgrp01
> >06-tcgrp02
> >
> >If that's not what you're after, could you break it down a little more for
> >us (e.g. "The first pass should have tc="05" and the select on tcs/1 should
> >return "06", which means it exists, so it should print 'tcgrp01)?
> >
> >Also, if you haven't already, sprinkle some print statements in there to
> >watch the values on each pass. That might tell you a lot.
> >
> >--Gregg
> >
> >--
> >To unsubscribe from this list, please send an email to
> >[EMAIL PROTECTED] with "unsubscribe" in the
> >subject, without the quotes.
> >
> >
>
>-------------------------------------------------
>"Sound Mind, Sound Body" Juv�nal
>"Lire et �tre curieux, c'est la m�me chose" Pascal Quignard
>"Qui triomphe de lui-m�me poss�de la force" Lao-Tseu, extrait du Tao Te King
>"Dans la course � la qualit�, il n'y a pas de ligne d'arriv�e" David Kearns
>Allez voir mon site : http://www.desala.org
>
>-------------------------------------------------------------
>NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
>Web/Wap : www.netcourrier.com
>T�l�phone/Fax : 08 92 69 00 21 (0,34 � TTC/min)
>Minitel: 3615 NETCOURRIER (0,15 � TTC/min)
>
>--
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the
>subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.