Hello,
I 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=3D"list.txt"
o fileList
f d q:eof
. u fileList r title set eof=3D$zeof
. u $p:(nowrap) w "title: """_title_"""",!
. set article=3Dtitle
. o article
. f d q:eof2
. . u article r htmlLine set eof2=3D$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: ""
<=3D 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=E9bastien


|