|< 1 2 >| | 19 Einträge, 2 Seiten |
1
2
3
4
5
do {
next if ($answer == wxCANCEL);
pce::edit::restore_positions;
}
until (pce::document::select_next == $first_doc);
Quoteder code ist selbsterklärend...
QuoteIst ja auch richtig....was mich wundert ist perl (5.8.6) das next nicht akzeptiert weil es behauptet es befinde sich in keiner schleife,...
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.
...
QuoteCode: (dl )1
2
3
4
5my $first_doc = &pce::document::save_positions;
$answer = &sniff_selection(0, $sci_frame->GetTextLength);
&pce::edit::__restore_positions;
}
until (&pce::document::select_next == $first_doc);
1
2
3
4
5
6
7
while(&pce::document::select_next != $first_doc); {
next if ($answer == wxCANCEL);
& pce::edit:: save_positions;
//$answer = &sniff_selection(0, $sci_frame->GetTextLength);
&pce::edit::restore_positions;
}
|< 1 2 >| | 19 Einträge, 2 Seiten |