- Subject: Re: Looping and composite conditions
- From: "John E. Davis" <davis>
- Date: Thu, 19 Dec 2002 18:01:14 -0500
Klaus Schmid <klaus.schmid@xxxxxx> wrote:
>Seems the while-loop gets infinite, if there is a translated msgstr.
>I would try to insert 'else ()= down(1);' as follows:
>
>% find the next untranslated msgstr
> define find_untranslated ()
> {
> push_mark();
> while (bol_fsearch ("msgstr"))
> if (is_untranslated () and fsearch ("\""))
> {
> pop_mark(0);
> go_right_1();
> return;
> }
> else
> ()= down(1);
> message ("Not found");
> pop_mark(1);
> }
It could still loop forever if the last line starts with "msgstr" and
the first if condition fails. It is better to use "eol()" instead of
"()=down(1)" to avoid the problem.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2002 date index]
[2002 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]