IF THEN ELSE expression case I



IF THEN ELSE expression Example I
Smart pascal source code
var b := True; WriteLn(if b then 't' else 'f'); WriteLn(if not b then 'f' else 't'); b := if b then not b else b; WriteLn(if b then 't' else 'f'); WriteLn(if not b then 'f' else 't'); WriteLn(if 1 + 1 = 2 then 'good' else 'bad'); WriteLn(if 1 + 2 = 2 then 'oops!' else 'good'); {<<< RESULT - CONSOLE LOG >>> ----------------------------- t t f f good good ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}