Skip to content

Commit 39e0338

Browse files
ADD: example for ucomplex.pas
1 parent 7511c2f commit 39e0338

File tree

7 files changed

+983
-0
lines changed

7 files changed

+983
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Collection of classes and examples corresponding to data processing, math and co
6161

6262
| Example | Description |
6363
| --- | --- |
64+
| [Complex](data_control/Complex) | demo for ucomplex.pas |
6465
| [JSON_Analyzer](data_control/JSON_Analyzer) | demo application for uJSON.pas |
6566
| [LZW](data_control/LZW) | demo application for uLZW.pas (Lempel-Ziv-Welch algorithm) |
6667
| [QuadTree](data_control/QuadTree) | demo application for uquadtree.pas |
@@ -69,6 +70,7 @@ Collection of classes and examples corresponding to data processing, math and co
6970
| uLZW.pas | Implementation of Lempel-Ziv-Welch algorithm with two different dictionaries |
7071
| ubitstream.pas | Stream to store and load bitwise data (typically only needed in compression algorithms) |
7172
| ucrc.pas | Generic crc calculation class |
73+
| ucomplex.pas | Basic component to do calculations with complex numbers |
7274
| udomxml.pas | generic xml parser |
7375
| ueventer.pas| class toc reate events for components that are not derived from LCL-Components |
7476
| ufifo.pas | generic first in first out class |

data_control/Complex/project1.lpi

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<General>
6+
<Flags>
7+
<CompatibilityMode Value="True"/>
8+
</Flags>
9+
<SessionStorage Value="InProjectDir"/>
10+
<Title Value="project1"/>
11+
<ResourceType Value="res"/>
12+
<UseXPManifest Value="True"/>
13+
<Icon Value="0"/>
14+
</General>
15+
<i18n>
16+
<EnableI18N LFM="False"/>
17+
</i18n>
18+
<BuildModes Count="1">
19+
<Item1 Name="Default" Default="True"/>
20+
</BuildModes>
21+
<PublishOptions>
22+
<Version Value="2"/>
23+
</PublishOptions>
24+
<RunParams>
25+
<local>
26+
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
27+
</local>
28+
<FormatVersion Value="2"/>
29+
<Modes Count="1">
30+
<Mode0 Name="default">
31+
<local>
32+
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
33+
</local>
34+
</Mode0>
35+
</Modes>
36+
</RunParams>
37+
<RequiredPackages Count="1">
38+
<Item1>
39+
<PackageName Value="LCL"/>
40+
</Item1>
41+
</RequiredPackages>
42+
<Units Count="5">
43+
<Unit0>
44+
<Filename Value="project1.lpr"/>
45+
<IsPartOfProject Value="True"/>
46+
</Unit0>
47+
<Unit1>
48+
<Filename Value="unit1.pas"/>
49+
<IsPartOfProject Value="True"/>
50+
<ComponentName Value="Form1"/>
51+
<HasResources Value="True"/>
52+
<ResourceBaseClass Value="Form"/>
53+
<UnitName Value="Unit1"/>
54+
</Unit1>
55+
<Unit2>
56+
<Filename Value="../ucomplex.pas"/>
57+
<IsPartOfProject Value="True"/>
58+
</Unit2>
59+
<Unit3>
60+
<Filename Value="../../Graphik/ugraphics.pas"/>
61+
<IsPartOfProject Value="True"/>
62+
</Unit3>
63+
<Unit4>
64+
<Filename Value="uvectormath.inc"/>
65+
<IsPartOfProject Value="True"/>
66+
</Unit4>
67+
</Units>
68+
</ProjectOptions>
69+
<CompilerOptions>
70+
<Version Value="11"/>
71+
<Target>
72+
<Filename Value="project1"/>
73+
</Target>
74+
<SearchPaths>
75+
<IncludeFiles Value="$(ProjOutDir)"/>
76+
<OtherUnitFiles Value="..;../../Graphik"/>
77+
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
78+
</SearchPaths>
79+
<Linking>
80+
<Options>
81+
<Win32>
82+
<GraphicApplication Value="True"/>
83+
</Win32>
84+
</Options>
85+
</Linking>
86+
</CompilerOptions>
87+
<Debugging>
88+
<Exceptions Count="3">
89+
<Item1>
90+
<Name Value="EAbort"/>
91+
</Item1>
92+
<Item2>
93+
<Name Value="ECodetoolError"/>
94+
</Item2>
95+
<Item3>
96+
<Name Value="EFOpenError"/>
97+
</Item3>
98+
</Exceptions>
99+
</Debugging>
100+
</CONFIG>

data_control/Complex/project1.lpr

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
(******************************************************************************)
2+
(* *)
3+
(* Author : Uwe Schächterle (Corpsman) *)
4+
(* *)
5+
(* This file is part of uComplex Demo *)
6+
(* *)
7+
(* See the file license.md, located under: *)
8+
(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *)
9+
(* for details about the license. *)
10+
(* *)
11+
(* It is not allowed to change or remove this text from any *)
12+
(* source file of the project. *)
13+
(* *)
14+
(******************************************************************************)
15+
Program project1;
16+
17+
{$MODE objfpc}{$H+}
18+
19+
Uses
20+
{$IFDEF UNIX}{$IFDEF UseCThreads}
21+
cthreads,
22+
{$ENDIF}{$ENDIF}
23+
Interfaces, // this includes the LCL widgetset
24+
Forms, Unit1, ucomplex, ugraphics
25+
{ you can add units after this };
26+
27+
{$R *.res}
28+
29+
Begin
30+
RequireDerivedFormResource := True;
31+
Application.Initialize;
32+
Application.CreateForm(TForm1, Form1);
33+
Application.Run;
34+
End.
35+

0 commit comments

Comments
 (0)