The semicolon which you inserted causes the line . c article to be skipped
because it forces the dot level back to 0. The proper way would be . .
;u
$p:(nowrap) w htmlLine,!
Also, you should add q:eof following set eof=$zeof, and add q:eof2
following set eof2=$zeof.
"Sébastien de Mapias" <sglrigaud@[EMAIL PROTECTED]
> wrote in message
news:1194262671.097785.203290@[EMAIL PROTECTED]
have a file f1 containing files names;
I want to loop thru this file f1,
get every line - which will give me another filename;
I want to open this 'filename'
and read it (get every line too) entirely
I have a problem with the use of $ZEOF: in the .m
module below I can't get out of the first loop; it works
as I can see the contents of the files referenced in
'list.txt' but then my programs hangs ('eof' remains at
0 -zero-):
defil
set fileList="list.txt"
o fileList
f d q:eof
. u fileList r title set eof=$zeof
. u $p:(nowrap) w "title: """_title_"""",!
. set article=title
. o article
. f d q:eof2
. . u article r htmlLine set eof2=$zeof
. . u $p:(nowrap) w "eof-"_eof_", eof2-"_eof2,!
;. . u $p:(nowrap) w htmlLine,!
. c article
w "do I get here ?",!
c fileList
It returns the following:
title: "dirOfFiles/fichier1.txt"
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-1
title: "dirOfFiles/fichier2.txt"
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-0
eof-0, eof2-1
title: ""
<= here it hangs and never terminates
Is there a way to tell Mumps not to confuse the different
calls to $ZEOF ??
In advance, thanks...
Regards,
Sébastien


|