mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 07:08:29 +02:00
42 lines
649 B
ObjectPascal
42 lines
649 B
ObjectPascal
{ %target=darwin }
|
|
{ %cpu=powerpc,powerpc64,i386,x86_64,arm,aarch64 }
|
|
|
|
{ Written by Jonas Maebe in 2009, released into the public domain }
|
|
|
|
program project1;
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$modeswitch objectivec1}
|
|
type
|
|
|
|
MyObject = objcclass(NSObject)
|
|
|
|
function getsspara(l1,l2: longint): shortstring ; message 'getss:l1:';
|
|
|
|
end;
|
|
|
|
var
|
|
m: MyObject;
|
|
b: boolean;
|
|
|
|
function MyObject.getsspara(l1,l2: longint): shortstring;
|
|
begin
|
|
if (self<>m) then
|
|
halt(1);
|
|
if (self.self<>m) then
|
|
halt(2);
|
|
if _cmd<>objcselector('getss:l1:') then
|
|
halt(3);
|
|
result:='';
|
|
end;
|
|
|
|
|
|
begin
|
|
m := MyObject.alloc;
|
|
m:=m.init;
|
|
|
|
m.getsspara(1,2);
|
|
|
|
m.release;
|
|
end.
|