IF THEN ELSE expression case IV



IF THEN ELSE expression Example IV
Smart pascal source code
procedure Proc1; begin WriteLn('Proc1'); end; procedure Proc2; begin WriteLn('Proc2'); end; var b: Boolean; var p := if b then @Proc1 else @Proc2; p(); p := if not b then @Proc1 else @Proc2; p(); p := if True then @Proc1 else @Proc2; p(); p := if False then @Proc1 else @Proc2; p(); {<<< RESULT - CONSOLE LOG >>> ----------------------------- Proc2 Proc1 Proc1 Proc2 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}