Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.2.0 / tests / webtbs / tw9073.pp
Size: Mime:
{%skiptarget=$nothread }
{ %opt=-CN }

{ the -CN is to generated null pointer load checks for AIX,
  ignored on other platforms because there the OS performs
  this checking for you }

{$mode objfpc}

uses
{$ifdef unix}
  cthreads,
{$endif}
  SysUtils, Classes;

type
  tc = class(tthread)
    procedure execute; override;
  end;

var
  caught: boolean;

procedure tc.execute;
type
  plongint = ^longint;
var
  p: plongint;
begin
  p:=nil;
  try
    writeln(p^);
  except
    caught:=true;
  end;
end;

var
  c: tc;
begin
  caught:=false;
  c:=tc.create(false);
  c.waitfor;
  c.free;
  halt(ord(not caught));
end.