- 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."); // Не выполнится
- }
|