blob: 279fb01dd280c2e82f5a52747da59259046d0b5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ 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.
|