Talk About Network

Google


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 > Re: Embedded us...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 905 of 992
Post > Topic >>

Re: Embedded use of $ZEOF in sub-loops

by "Maury Pepper" <mpepper.scram.spam@[EMAIL PROTECTED] > Nov 7, 2007 at 03:48 PM

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
 




 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 Sat Jul 26 5:34:57 CDT 2008.