Hi Ingo,
you wrote:
>Now here's a real life example ...
>
>Just a descriptive line that noone needs
>NOTU=6, NLOC=15, NALL=5;
>(fortran format string)
The following works rather painlessly. Is it possible to reduce the size
using parse? Hmmm, don't know!
data: {Just a descriptive line that noone needs
NOTU=6, NLOC=15, NALL=5;
(fortran format string)}
result: make block! []
word-chars: charset [#"a" - #"z" #"A" - #"Z" #"0" - #"9"]
word: [some word-chars]
item-rule: [copy label word #"=" copy value word (append result reduce
[label value])]
rule: [(clear result) some [item-rule | skip] (print result)]
>> parse/all data rule
NOTU 6 NLOC 15 NALL 5
>> foreach [label value] result [ print [label ":" value] ]
NOTU : 6
NLOC : 15
NALL : 5
Hope this helps,
Elan