Thread do {} until () anomalie? (18 answers)
Opened by lichtkind at 2005-01-20 04:04

format_c
 2005-01-20 09:55
#50902 #50902
User since
2003-08-04
1706 Artikel
HausmeisterIn
[Homepage] [default_avatar]
[quote=lichtkind,20.01.2005, 03:04][/quote]
Quote
der code ist selbsterklärend...

Ähm echt??
Quote
...was mich wundert ist perl (5.8.6) das next nicht akzeptiert weil es behauptet es befinde sich in keiner schleife,...
Ist ja auch richtig.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
C:\Documents and Settings\M01169>perldoc -f do
   do BLOCK
           Not really a function. Returns the value of the last command in
           the sequence of commands indicated by BLOCK. When modified by a
           loop modifier, executes the BLOCK once before testing the loop
           condition. (On other statements the loop modifiers test the
           conditional first.)

           "do BLOCK" does *not* count as a loop, so the loop control
           statements "next", "last", or "redo" cannot be used to leave or
           restart the block. See perlsyn for alternative strategies.
...


Quote
Code: (dl )
1
2
3
4
5
my $first_doc = &pce::document::save_positions;
   $answer = &sniff_selection(0, $sci_frame->GetTextLength);
   &pce::edit::__restore_positions;
}
until (&pce::document::select_next == $first_doc);

Abgesehen davon, dass es stimmt was du sagst, hast du trotzdem den spannensten Teil deines Codes weggelassen :-)

Gruß Alex\n\n

<!--EDIT|format_c|1106207759-->

View full thread do {} until () anomalie?