1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-15 05:45:02 -05:00

PSTest also works with safecall, but I doubt it'll work for Linux.. worth testing though?

This commit is contained in:
Niels 2010-04-07 20:09:39 +02:00
parent 9d67a02b99
commit 3e953ae6be
6 changed files with 209 additions and 122 deletions

View File

@ -8,10 +8,10 @@
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<Title Value="TestApp"/> <Title Value="TestApp"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="2"/> <ActiveWindowIndexAtStart Value="0"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
</VersionInfo> </VersionInfo>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@ -35,7 +35,12 @@
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<UsageCount Value="24"/> <EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="14" Y="20"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
@ -43,121 +48,123 @@
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/> <UnitName Value="Unit1"/>
<CursorPos X="75" Y="10"/> <IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="24"/> <WindowIndex Value="0"/>
<TopLine Value="127"/>
<CursorPos X="97" Y="138"/>
<UsageCount Value="25"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\..\Source\uPSRuntime.pas"/> <Filename Value="..\..\Source\uPSRuntime.pas"/>
<UnitName Value="uPSRuntime"/> <UnitName Value="uPSRuntime"/>
<CursorPos X="26" Y="11271"/>
<TopLine Value="11259"/> <TopLine Value="11259"/>
<CursorPos X="26" Y="11271"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="..\..\Source\uPSUtils.pas"/> <Filename Value="..\..\Source\uPSUtils.pas"/>
<UnitName Value="uPSUtils"/> <UnitName Value="uPSUtils"/>
<CursorPos X="22" Y="325"/>
<TopLine Value="309"/> <TopLine Value="309"/>
<CursorPos X="22" Y="325"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="..\..\..\..\FPC\FPCCheckout\rtl\objpas\classes\classesh.inc"/> <Filename Value="C:\FPC\FPCCheckout\rtl\objpas\classes\classesh.inc"/>
<CursorPos X="3" Y="160"/>
<TopLine Value="144"/> <TopLine Value="144"/>
<CursorPos X="3" Y="160"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="..\..\Source\uPSPreProcessor.pas"/> <Filename Value="..\..\Source\uPSPreProcessor.pas"/>
<UnitName Value="uPSPreProcessor"/> <UnitName Value="uPSPreProcessor"/>
<CursorPos X="28" Y="5"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="28" Y="5"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="..\..\Source\uPSR_controls.pas"/> <Filename Value="..\..\Source\uPSR_controls.pas"/>
<UnitName Value="uPSR_controls"/> <UnitName Value="uPSR_controls"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="..\..\..\..\lazarus\lcl\controls.pp"/> <Filename Value="..\..\..\lcl\controls.pp"/>
<UnitName Value="Controls"/> <UnitName Value="Controls"/>
<CursorPos X="37" Y="324"/>
<TopLine Value="318"/> <TopLine Value="318"/>
<CursorPos X="37" Y="324"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="..\..\Source\testps.pas"/> <Filename Value="..\..\Source\testps.pas"/>
<UnitName Value="TestPS"/> <UnitName Value="TestPS"/>
<CursorPos X="32" Y="86"/>
<TopLine Value="83"/> <TopLine Value="83"/>
<CursorPos X="32" Y="86"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="testps.pas"/> <Filename Value="testps.pas"/>
<UnitName Value="TestPS"/> <UnitName Value="TestPS"/>
<CursorPos X="1" Y="119"/> <EditorIndex Value="2"/>
<TopLine Value="88"/> <WindowIndex Value="0"/>
<EditorIndex Value="1"/> <TopLine Value="95"/>
<CursorPos X="19" Y="19"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\uPSRuntime.pas"/> <Filename Value="C:\Documents\pascalscript\Source\uPSRuntime.pas"/>
<UnitName Value="uPSRuntime"/> <UnitName Value="uPSRuntime"/>
<CursorPos X="12" Y="2"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="12" Y="2"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\uPSUtils.pas"/> <Filename Value="C:\Documents\pascalscript\Source\uPSUtils.pas"/>
<UnitName Value="uPSUtils"/> <UnitName Value="uPSUtils"/>
<CursorPos X="25" Y="11"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="3"/> <CursorPos X="25" Y="11"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\uPSComponent.pas"/> <Filename Value="C:\Documents\pascalscript\Source\uPSComponent.pas"/>
<UnitName Value="uPSComponent"/> <UnitName Value="uPSComponent"/>
<CursorPos X="24" Y="16"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="24" Y="16"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\upsutils.pas"/> <Filename Value="C:\Documents\pascalscript\Source\PascalScript.inc"/>
<UnitName Value="uPSUtils"/> <TopLine Value="30"/>
<CursorPos X="39" Y="15"/> <CursorPos X="32" Y="48"/>
<TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\PascalScript.inc"/> <Filename Value="C:\Documents\pascalscript\Source\PascalScriptFPC.inc"/>
<CursorPos X="32" Y="48"/> <TopLine Value="1"/>
<TopLine Value="30"/> <CursorPos X="28" Y="15"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\PascalScriptFPC.inc"/> <Filename Value="C:\Documents\pascalscript\Source\x86.inc"/>
<CursorPos X="28" Y="15"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="65" Y="115"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="..\..\..\..\Documents\pascalscript\Source\x86.inc"/> <Filename Value="..\..\Units\PascalScript\uPSComponent.pas"/>
<CursorPos X="65" Y="115"/> <UnitName Value="uPSComponent"/>
<TopLine Value="1"/> <WindowIndex Value="0"/>
<EditorIndex Value="2"/> <TopLine Value="479"/>
<CursorPos X="31" Y="498"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit16> </Unit16>
</Units> </Units>
<JumpHistory Count="7" HistoryIndex="6"> <JumpHistory Count="24" HistoryIndex="23">
<Position1> <Position1>
<Filename Value="testps.pas"/> <Filename Value="testps.pas"/>
<Caret Line="20" Column="44" TopLine="1"/> <Caret Line="20" Column="44" TopLine="1"/>
@ -186,6 +193,74 @@
<Filename Value="testps.pas"/> <Filename Value="testps.pas"/>
<Caret Line="119" Column="1" TopLine="88"/> <Caret Line="119" Column="1" TopLine="88"/>
</Position7> </Position7>
<Position8>
<Filename Value="project1.lpr"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position8>
<Position9>
<Filename Value="project1.lpr"/>
<Caret Line="21" Column="1" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="project1.lpr"/>
<Caret Line="17" Column="93" TopLine="1"/>
</Position10>
<Position11>
<Filename Value="project1.lpr"/>
<Caret Line="21" Column="1" TopLine="1"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="107" Column="45" TopLine="123"/>
</Position12>
<Position13>
<Filename Value="testps.pas"/>
<Caret Line="18" Column="42" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="testps.pas"/>
<Caret Line="33" Column="47" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="testps.pas"/>
<Caret Line="16" Column="28" TopLine="1"/>
</Position15>
<Position16>
<Filename Value="testps.pas"/>
<Caret Line="38" Column="76" TopLine="10"/>
</Position16>
<Position17>
<Filename Value="testps.pas"/>
<Caret Line="17" Column="34" TopLine="1"/>
</Position17>
<Position18>
<Filename Value="testps.pas"/>
<Caret Line="38" Column="68" TopLine="19"/>
</Position18>
<Position19>
<Filename Value="testps.pas"/>
<Caret Line="8" Column="34" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="testps.pas"/>
<Caret Line="17" Column="42" TopLine="3"/>
</Position20>
<Position21>
<Filename Value="testps.pas"/>
<Caret Line="26" Column="52" TopLine="1"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="161" Column="18" TopLine="139"/>
</Position22>
<Position23>
<Filename Value="testps.pas"/>
<Caret Line="125" Column="55" TopLine="95"/>
</Position23>
<Position24>
<Filename Value="testps.pas"/>
<Caret Line="62" Column="17" TopLine="43"/>
</Position24>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -0,0 +1,6 @@
#define RT_MANIFEST 24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "project1.manifest"

View File

@ -13,15 +13,15 @@ type
x, y:integer; x, y:integer;
end; end;
function MakeArr : TStringArray; function MakeArr : TStringArray; safecall;
procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer); procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer); safecall;
function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer; function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer; safecall;
function TestString(Str1,Str2,Str3 : string) : string; function TestString(Str1,Str2,Str3 : string) : string; safecall;
function TestStringEdit(var Str : string) : String; function TestStringEdit(var Str : string) : String; safecall;
procedure TestArrayPassing( Arr : TStringArray); procedure TestArrayPassing( Arr : TStringArray); safecall;
Procedure TestArrayEdit(var Arr : TStringArray); Procedure TestArrayEdit(var Arr : TStringArray); safecall;
function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray; function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray; safecall;
function makePoint(x, y: integer): w_Tpoint; function makePoint(x, y: integer): w_Tpoint; safecall;
implementation implementation
@ -33,7 +33,7 @@ begin;
Form1.Memo2.Lines.add(s); Form1.Memo2.Lines.add(s);
end; end;
procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer); procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer); safecall;
begin; begin;
Writeln('Parameters are: ' + format('%d %d %d %d %d %d',[int1,int2,int3,int4,int5,int6])); Writeln('Parameters are: ' + format('%d %d %d %d %d %d',[int1,int2,int3,int4,int5,int6]));
if (int1 <> 1) or (int2 <> 2) or (int3 <> 3) or (int4 <> 4) or (int5 <> 5) or (int6 <> 6) then if (int1 <> 1) or (int2 <> 2) or (int3 <> 3) or (int4 <> 4) or (int5 <> 5) or (int6 <> 6) then
@ -42,13 +42,13 @@ begin;
Writeln('Passed this test'); Writeln('Passed this test');
end; end;
function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer; function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer; safecall;
begin; begin;
Result := int1 + int2 + int3 + int4 + int5 + int6; Result := int1 + int2 + int3 + int4 + int5 + int6;
Writeln('Result should be:' + inttostr(int1+int2+int3+int4+int5+int6)); Writeln('Result should be:' + inttostr(int1+int2+int3+int4+int5+int6));
end; end;
function TestString(Str1,Str2,Str3 : string) : string; function TestString(Str1,Str2,Str3 : string) : string; safecall;
begin; begin;
if Str1+Str2+str3 = 'lol' then if Str1+Str2+str3 = 'lol' then
Writeln('Strings got passed over correctly.'); Writeln('Strings got passed over correctly.');
@ -59,7 +59,7 @@ begin;
Writeln('Result should be a'); Writeln('Result should be a');
end; end;
function TestStringEdit(var Str : string) : String; function TestStringEdit(var Str : string) : String; safecall;
begin; begin;
Result := 'False'; Result := 'False';
if Str <> 'Test' then if Str <> 'Test' then
@ -70,7 +70,7 @@ begin;
Writeln('Result should be: hopla; Input str should be tseT'); Writeln('Result should be: hopla; Input str should be tseT');
end; end;
procedure TestArrayPassing(Arr : TStringArray); procedure TestArrayPassing(Arr : TStringArray); safecall;
var var
i : integer; i : integer;
begin; begin;
@ -80,7 +80,7 @@ begin;
end; end;
Procedure TestArrayEdit(var Arr : TStringArray); Procedure TestArrayEdit(var Arr : TStringArray); safecall;
begin; begin;
Writeln('Arr size is ' + inttostr(length(arr))); Writeln('Arr size is ' + inttostr(length(arr)));
SetLength(arr,0); SetLength(arr,0);
@ -92,7 +92,7 @@ begin;
arr[4] := '!'; arr[4] := '!';
end; end;
function ConvStrArr( Arr : Array of String): TStringArray; function ConvStrArr( Arr : Array of String): TStringArray; safecall;
var var
Len : Integer; Len : Integer;
begin; begin;
@ -101,7 +101,7 @@ begin;
Move(Arr[Low(Arr)], Result[0], Len*SizeOf(String)); Move(Arr[Low(Arr)], Result[0], Len*SizeOf(String));
end; end;
function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray; function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray; safecall;
begin begin
Writeln(Format('Len(Arr1) = %d - Len(Arr2) = %d',[Length(Arr1),length(arr2)])); Writeln(Format('Len(Arr1) = %d - Len(Arr2) = %d',[Length(Arr1),length(arr2)]));
SetLength(Result,0); SetLength(Result,0);
@ -115,14 +115,14 @@ begin
Result := ConvStrArr(['Waza?','Gaat','Alles','Goed']); Result := ConvStrArr(['Waza?','Gaat','Alles','Goed']);
end; end;
function MakeArr : TStringArray; function MakeArr : TStringArray; safecall;
begin; begin;
setlength(result,2); setlength(result,2);
result[0] := 'Test0'; result[0] := 'Test0';
Result[1] := 'Wow!'; Result[1] := 'Wow!';
end; end;
function makePoint(x, y: integer): w_Tpoint; function makePoint(x, y: integer): w_Tpoint; safecall;
begin begin
result.x := x; result.x := x;
result.y := y; result.y := y;

View File

@ -1,19 +1,20 @@
object Form1: TForm1 object Form1: TForm1
Left = 347 Left = 237
Height = 300 Height = 302
Top = 314 Top = 312
Width = 400 Width = 536
ActiveControl = Button1 ActiveControl = Button1
Caption = 'Bug in Pascal Script for Lazarus' Caption = 'Bug in Pascal Script for Lazarus'
ClientHeight = 300 ClientHeight = 302
ClientWidth = 400 ClientWidth = 536
LCLVersion = '0.9.29' LCLVersion = '0.9.29'
object Memo1: TMemo object Memo1: TMemo
Left = 0 Left = 0
Height = 137 Height = 139
Top = 55 Top = 55
Width = 400 Width = 536
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
Lines.Strings = ( Lines.Strings = (
'program TestPS;' 'program TestPS;'
'' ''
@ -66,7 +67,7 @@ object Form1: TForm1
' for i := 0 to high(arr1) do' ' for i := 0 to high(arr1) do'
' Writeln(arr1[i]);' ' Writeln(arr1[i]);'
' Writeln('''');' ' Writeln('''');'
' Writeln(''Should writeln: Ik ben een geest!'');' ' Writeln(''Should writeln: Testing!'');'
' for i := 0 to high(arr2) do' ' for i := 0 to high(arr2) do'
' writeln(arr2[i]);' ' writeln(arr2[i]);'
' writeln('''');' ' writeln('''');'
@ -77,13 +78,15 @@ object Form1: TForm1
'end.' 'end.'
) )
OnChange = Memo1Change OnChange = Memo1Change
ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
WordWrap = False
end end
object Memo2: TMemo object Memo2: TMemo
Left = 0 Left = 0
Height = 108 Height = 108
Top = 192 Top = 194
Width = 400 Width = 536
Align = alBottom Align = alBottom
TabOrder = 1 TabOrder = 1
end end
@ -91,8 +94,9 @@ object Form1: TForm1
Left = 0 Left = 0
Height = 55 Height = 55
Top = 0 Top = 0
Width = 400 Width = 536
Align = alClient Align = alCustom
Anchors = [akTop, akLeft, akRight]
Caption = 'Compile' Caption = 'Compile'
OnClick = Button1Click OnClick = Button1Click
TabOrder = 2 TabOrder = 2

View File

@ -1,43 +1,45 @@
{ This is an automatically generated lazarus resource file } { This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'['#1#6'Height'#3','#1#3'Top'#3':'#1#5'Wid' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#237#0#6'Height'#3'.'#1#3'Top'#3'8'#1#5'Wi'
+'th'#3#144#1#13'ActiveControl'#7#7'Button1'#7'Caption'#6' Bug in Pascal Scri' +'dth'#3#24#2#13'ActiveControl'#7#7'Button1'#7'Caption'#6' Bug in Pascal Scri'
+'pt for Lazarus'#12'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#10'LCLVersi' +'pt for Lazarus'#12'ClientHeight'#3'.'#1#11'ClientWidth'#3#24#2#10'LCLVersio'
+'on'#6#6'0.9.29'#0#5'TMemo'#5'Memo1'#4'Left'#2#0#6'Height'#3#137#0#3'Top'#2 +'n'#6#6'0.9.29'#0#5'TMemo'#5'Memo1'#4'Left'#2#0#6'Height'#3#139#0#3'Top'#2'7'
+'7'#5'Width'#3#144#1#5'Align'#7#8'alBottom'#13'Lines.Strings'#1#6#15'program' +#5'Width'#3#24#2#5'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
+' TestPS;'#6#0#6#3'var'#6#30' Str,Str1,str2,str3 : String;'#6'$ Arr,Arr1,A' +'kRight'#8'akBottom'#0#13'Lines.Strings'#1#6#15'program TestPS;'#6#0#6#3'var'
+'rr2,Arr3 : TStringArray;'#6#14' I : integer;'#6#14' p: w_TPoint;'#6#5'beg' +#6#30' Str,Str1,str2,str3 : String;'#6'$ Arr,Arr1,Arr2,Arr3 : TStringArray'
+'in'#6#30' TestParameters(1,2,3,4,5,6);'#6'1 if TestResult(1,2,3,4,5,6) = ' +';'#6#14' I : integer;'#6#14' p: w_TPoint;'#6#5'begin'#6#30' TestParamete'
+'(1+2+3+4+5+6) then'#6'M Writeln(''Result = '' + inttostr(1+2+3+4+5+6) + ' +'rs(1,2,3,4,5,6);'#6'1 if TestResult(1,2,3,4,5,6) = (1+2+3+4+5+6) then'#6'M'
+'''. Passed the result test'')'#6#6' else'#6'> Writeln(''Result = '' + ' +' Writeln(''Result = '' + inttostr(1+2+3+4+5+6) + ''. Passed the result t'
+'Inttostr(TestResult(1,2,3,4,5,6)) +'#6#31' ''. Failed @ result test'');' +'est'')'#6#6' else'#6'> Writeln(''Result = '' + Inttostr(TestResult(1,2'
+#6#22' p := makePoint(2,2);'#6'8 writeln(''p: '' + inttostr(p.x) + '', '' ' +',3,4,5,6)) +'#6#31' ''. Failed @ result test'');'#6#22' p := makePoint'
+'+ inttostr(p.y));'#6#14' Str1 := ''l'';'#6#14' Str2 := ''o'';'#6#14' Str' +'(2,2);'#6'8 writeln(''p: '' + inttostr(p.x) + '', '' + inttostr(p.y));'#6
+'3 := ''l'';'#6'* if TestString(Str1,Str2,Str3) = ''a'' then'#6'% Writel' +#14' Str1 := ''l'';'#6#14' Str2 := ''o'';'#6#14' Str3 := ''l'';'#6'* if '
+'n(''String test succesful.'')'#6#6' else'#6'# Writeln(''String test fai' +'TestString(Str1,Str2,Str3) = ''a'' then'#6'% Writeln(''String test succe'
+'led.'');'#6'8 if (str1 = ''l'') and (str2 = ''o'') and (str3 = ''l'') then' +'sful.'')'#6#6' else'#6'# Writeln(''String test failed.'');'#6'8 if (st'
+#6'( Writeln(''String test passed again.'')'#6#6' else'#6'# Writeln(' +'r1 = ''l'') and (str2 = ''o'') and (str3 = ''l'') then'#6'( Writeln(''St'
+'''String test failed.'');'#6#16' Str := ''Test'';'#6''' if TestStringEdit' +'ring test passed again.'')'#6#6' else'#6'# Writeln(''String test failed'
+'(Str) = ''hopla'' then'#6', Writeln(''TestStringEdit result passed.'')'#6 +'.'');'#6#16' Str := ''Test'';'#6''' if TestStringEdit(Str) = ''hopla'' th'
+#6' else'#6'- Writeln(''TestStringEdit result failed.'');'#6#22' if Str' +'en'#6', Writeln(''TestStringEdit result passed.'')'#6#6' else'#6'- W'
+' = ''tseT'' then'#6'+ Writeln(''TestStringEdit input passed.'')'#6#6' e' +'riteln(''TestStringEdit result failed.'');'#6#22' if Str = ''tseT'' then'#6
+'lse'#6', Writeln(''TestStringEdit input failed.'');'#6#21' TestArrayEdi' +'+ Writeln(''TestStringEdit input passed.'')'#6#6' else'#6', Writeln('
+'t(Arr);'#6'" For i := 0 to Length(arr) - 1 do'#6#20' Writeln(Arr[i]);'#6 +'''TestStringEdit input failed.'');'#6#21' TestArrayEdit(Arr);'#6'" For i '
+'* Writeln(''it shouldve written: "abcd!"'');'#6'1 Arr := TStringArray([''' +':= 0 to Length(arr) - 1 do'#6#20' Writeln(Arr[i]);'#6'* Writeln(''it sh'
+'Dit'',''is'',''een'',''test'']);'#6#24' TestArrayPassing(arr);'#6'< TestA' +'ouldve written: "abcd!"'');'#6'1 Arr := TStringArray([''Dit'',''is'',''een'
+'rrayPassing(TStringArray([''Dit'',''is'',''een'',''test'']));'#6'& Arr1 :=' +''',''test'']);'#6#24' TestArrayPassing(arr);'#6'< TestArrayPassing(TStrin'
+' TStringArray([''W'',''a'',''t'']);'#6'- Arr2 := TStringArray([''T'',''es' +'gArray([''Dit'',''is'',''een'',''test'']));'#6'& Arr1 := TStringArray([''W'
+''',''t'',''ing'']);'#6''' Arr3 := TStringArray([''Wowing'',''!'']);'#6'# ' +''',''a'',''t'']);'#6'- Arr2 := TStringArray([''T'',''es'',''t'',''ing'']);'
+'Arr3 := TestArrayFull(Arr1,Arr2);'#6'/ Writeln(''Should writeln: Hoi Hoe G' +#6''' Arr3 := TStringArray([''Wowing'',''!'']);'#6'# Arr3 := TestArrayFull'
+'aat Het?'');'#6#29' for i := 0 to high(arr1) do'#6#21' Writeln(arr1[i])' +'(Arr1,Arr2);'#6'/ Writeln(''Should writeln: Hoi Hoe Gaat Het?'');'#6#29' '
+';'#6#14' Writeln('''');'#6'/ Writeln(''Should writeln: Ik ben een geest!' +'for i := 0 to high(arr1) do'#6#21' Writeln(arr1[i]);'#6#14' Writeln('''
+''');'#6#29' for i := 0 to high(arr2) do'#6#20' writeln(arr2[i]);'#6#14' ' +''');'#6'& Writeln(''Should writeln: Testing!'');'#6#29' for i := 0 to hig'
+' writeln('''');'#6'3 Writeln(''Should writeln: Waza? Gaat alles goed'');'#6 +'h(arr2) do'#6#20' writeln(arr2[i]);'#6#14' writeln('''');'#6'3 Writeln('
+#29' for I := 0 to high(arr3) do'#6#21' Writeln(arr3[i]);'#6#0#6#4'end.' +'''Should writeln: Waza? Gaat alles goed'');'#6#29' for I := 0 to high(arr3'
+#0#8'OnChange'#7#11'Memo1Change'#8'TabOrder'#2#0#0#0#5'TMemo'#5'Memo2'#4'Lef' +') do'#6#21' Writeln(arr3[i]);'#6#0#6#4'end.'#0#8'OnChange'#7#11'Memo1Cha'
+'t'#2#0#6'Height'#2'l'#3'Top'#3#192#0#5'Width'#3#144#1#5'Align'#7#8'alBottom' +'nge'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#8'WordWrap'#8#0#0#5'TM'
+#8'TabOrder'#2#1#0#0#7'TButton'#7'Button1'#4'Left'#2#0#6'Height'#2'7'#3'Top' +'emo'#5'Memo2'#4'Left'#2#0#6'Height'#2'l'#3'Top'#3#194#0#5'Width'#3#24#2#5'A'
+#2#0#5'Width'#3#144#1#5'Align'#7#8'alClient'#7'Caption'#6#7'Compile'#7'OnCli' +'lign'#7#8'alBottom'#8'TabOrder'#2#1#0#0#7'TButton'#7'Button1'#4'Left'#2#0#6
+'ck'#7#12'Button1Click'#8'TabOrder'#2#2#0#0#0 +'Height'#2'7'#3'Top'#2#0#5'Width'#3#24#2#5'Align'#7#8'alCustom'#7'Anchors'#11
+#5'akTop'#6'akLeft'#7'akRight'#0#7'Caption'#6#7'Compile'#7'OnClick'#7#12'But'
+'ton1Click'#8'TabOrder'#2#2#0#0#0
]); ]);

View File

@ -161,16 +161,16 @@ begin
Sender.AddFunction(@testnormal,'function testnormal(num1,num2,num3,num4,num5,num6 : LongInt) : boolean;'); Sender.AddFunction(@testnormal,'function testnormal(num1,num2,num3,num4,num5,num6 : LongInt) : boolean;');
Sender.AddFunctionEx(@teststdcall, 'function teststdcall(num1,num2,num3,num4,num5,num6 : LongInt) : boolean;stdcall;',cdStdCall); Sender.AddFunctionEx(@teststdcall, 'function teststdcall(num1,num2,num3,num4,num5,num6 : LongInt) : boolean;stdcall;',cdStdCall);
Sender.AddFunctionEx(@testcdecl, 'function testcdecl(num1,num2,num3,num4,num5,num6 : LongInt) : boolean; cdecl;',cdCdecl); Sender.AddFunctionEx(@testcdecl, 'function testcdecl(num1,num2,num3,num4,num5,num6 : LongInt) : boolean; cdecl;',cdCdecl);
Sender.AddFunction(@DiffTest,'function DiffTest(num : integer; str : string; byt : byte; wor : longword; bool : boolean) : boolean;'); Sender.AddFunctionEx(@DiffTest,'function DiffTest(num : integer; str : string; byt : byte; wor : longword; bool : boolean) : boolean;', cdSafeCall);
Sender.AddFunction(@TestParameters,'procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer);'); Sender.AddFunctionEx(@TestParameters,'procedure TestParameters(Int1,Int2,Int3,Int4,Int5,Int6 : integer);', cdSafeCall);
Sender.AddFunction(@TestResult,'function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer;'); Sender.AddFunctionEx(@TestResult,'function TestResult(Int1,Int2,Int3,Int4,Int5,Int6 : integer): Integer;', cdSafeCall);
Sender.AddFunction(@TestString,'function TestString(Str1,Str2,Str3 : string) : string;'); Sender.AddFunctionEx(@TestString,'function TestString(Str1,Str2,Str3 : string) : string;', cdSafeCall);
Sender.AddFunction(@TestStringEdit,'function TestStringEdit(var Str : string) : String;'); Sender.AddFunctionEx(@TestStringEdit,'function TestStringEdit(var Str : string) : String;', cdSafeCall);
Sender.AddFunction(@TestArrayPassing,'procedure TestArrayPassing(const Arr : TStringArray);'); Sender.AddFunctionEx(@TestArrayPassing,'procedure TestArrayPassing(const Arr : TStringArray);', cdSafeCall);
Sender.AddFunction(@TestArrayEdit,'Procedure TestArrayEdit(var Arr : TStringArray);'); Sender.AddFunctionEx(@TestArrayEdit,'Procedure TestArrayEdit(var Arr : TStringArray);', cdSafeCall);
Sender.AddFunction(@TestArrayFull,'function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray;'); Sender.AddFunctionEx(@TestArrayFull,'function TestArrayFull(var Arr1: TStringArray; Arr2 : TStringArray): TStringArray;', cdSafeCall);
Sender.AddFunction(@MakeArr,'function MakeArr : TStringArray;'); Sender.AddFunctionEx(@MakeArr,'function MakeArr : TStringArray;', cdSafeCall);
Sender.AddFunction(@makePoint, 'function makePoint(x, y: integer): w_Tpoint;'); Sender.AddFunctionEx(@makePoint, 'function makePoint(x, y: integer): w_Tpoint;', cdSafeCall);
end; end;