Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Mumps > Embedded use of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 905 of 959
Post > Topic >>

Embedded use of $ZEOF in sub-loops

by =?iso-8859-1?q?S=E9bastien_de_Mapias?= <sglrigaud@[EMAIL PROTECTED] > Nov 5, 2007 at 11:37 AM

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




 5 Posts in Topic:
Embedded use of $ZEOF in sub-loops
=?iso-8859-1?q?S=E9bastie  2007-11-05 11:37:51 
Re: Embedded use of $ZEOF in sub-loops
=?iso-8859-1?q?S=E9bastie  2007-11-05 12:11:02 
Re: Embedded use of $ZEOF in sub-loops
Julius Kavay <kavay@[E  2007-11-05 21:46:01 
Re: Embedded use of $ZEOF in sub-loops
Ed de Moel <demoel@[EM  2007-11-06 04:53:53 
Re: Embedded use of $ZEOF in sub-loops
"Maury Pepper"   2007-11-07 15:48:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 18:41:17 CDT 2008.