4 глава
This commit is contained in:
parent
e0caa7caab
commit
ec805e7f08
15 changed files with 1584 additions and 1 deletions
9
03-инструкции/src/chapter-3-13/app.d
Normal file
9
03-инструкции/src/chapter-3-13/app.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
void main()
|
||||
{
|
||||
import std.stdio;
|
||||
|
||||
scope(exit) writeln("Running scope exit"); // Выполнится самая последняя
|
||||
scope(success) writeln("Running scope success"); // Выполнится самая первая
|
||||
return;
|
||||
scope(exit) writeln("This is never run since the function returned before it was registered."); // Не выполнится
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue