Control flow / Conditional statements / if/else statements

uses System.SysUtils;

var
  N: Integer;
begin
  //assignment inside the condition:
  //Try* fills the out parameter
  if TryStrToInt('42', N) then
    WriteLn('n1 is ', N)
  else
    WriteLn('n1 is empty');

  if not TryStrToInt('4x', N) then
    WriteLn('n2 is empty');
end.