[REBOL] none? ???
From: pyxos::netcourrier::com at: 18-Apr-2002 16:08
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: =5B
=5B tcgrp01 =2205=22 =2206=22 =2207=22 =2215=22 =2216=22 =2217=22 =2225=22 =2226=22 =2227=22
=2235=22 =2236=22 =2237=22 =5D
=5B tcgrp02 =2202=22 =5D
=5D
texte: read/lines output
offset: 7
foreach ligne texte =5B
foreach grp tcs =5B
tc: remove/part copy/part ligne (offset + 2) offset ; Keep the two first characters after
the index and the extra space
if not none? =5B select grp tc =5D =5B
print rejoin =5B tc =22-=22 first grp =5D
=5D
=5D
=5D
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
-------------------------------------------------
=22Sound Mind, Sound Body=22 Juv=E9nal
=22Lire et =EAtre curieux, c'est la m=EAme chose=22 Pascal Quignard
=22Qui triomphe de lui-m=EAme poss=E8de la force=22 Lao-Tseu, extrait du Tao Te King
=22Dans la course =E0 la qualit=E9, il n'y a pas de ligne d'arriv=E9e=22 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=E9l=E9phone/Fax : 08 92 69 00 21 (0,34 =80 TTC/min)
Minitel: 3615 NETCOURRIER (0,15 =80 TTC/min)