stack of proc



stack of proc
Smart pascal source code
var s: array of procedure; procedure Hello; begin WriteLn('Hello'); end; procedure World; begin WriteLn('World'); end; s.Push(World); s.Push(Hello); s.Pop(); s.Pop(); try s.Pop(); except on e: Exception do WriteLn(e.Message); end; {<<< RESULT - CONSOLE LOG >>> ----------------------------- Hello World Upper bound exceeded! Index 0 [line: 19, column: 6] ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}