Hi, 

I got an input file like this : 

100002 050042011006470
100002 050100000000000
100003 050042011006470
100004 050042011003653
100005 050042011004029
100006 050049750304500
100007 250042011006470
100007 250100000000000
100008 250042011003653
100009 250042011004029
100010 250049750304500
100011 060042011006470

and the following code :

tcs: [
     [ tcgrp01 "05" "06" "07" "15" "16" "17" "25" "26" "27" "35" "36" "37" ]
     [ tcgrp02 "02" ]     
   ]
   
texte: read/lines output
offset: 7

foreach ligne texte [
   foreach grp tcs [
      tc: remove/part copy/part ligne (offset + 2) offset ; Keep the two first 
characters after the index and the extra space
      if not none? [ select grp tc ] [
         print rejoin [ tc "-" first grp ]
      ]
   ]
]

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 ?

TIA

-------------------------------------------------
"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.

Reply via email to