Download
 0: unit FSTypes;
 1: {------------------------------------------------------------------------------
 2:   Common/Basci type declarations (missing from Borland System, Types, Windows headers)
 3: 
 4:   Created       : 2008.05.21
 5:   Last modified : 2011.01.13
 6:   Written by Istvan Szikra   https://en.szikraistvan.hu/    
 7: 
 8:   - for Matrices see FMathMatrix unit
 9:   - for Complex numbers see FMathComplex unit
10:  ------------------------------------------------------------------------------}
11: 
12: interface
13: 
14: uses Types; /// System
15: 
16: type
17: /// some missing Array types
18: ///  PByteArray,  TByteArray,  PWordArray,  TWordArray are defined in SysUtils
19:   PLargeByteArray = ^TLargeByteArray;
20:   TLargeByteArray = array [0..Pred(MaxLongint)] of Byte;
21:   PLargeWordArray = ^TLargeWordArray;
22:   TLargeWordArray = array[0..(MaxLongint div SizeOf(Word))-1] of Word;
23: 
24:   TExtendedArray  = array[0..(MaxLongint div SizeOf(Extended))-1] of Extended;
25:   PExtendedArray  = ^TExtendedArray;
26:   TDoubleArray    = array[0..(MaxLongint div SizeOf(Double))-1] of Double;
27:   PDoubleArray    = ^TDoubleArray;
28:   TSingleArray    = array[0..(MaxLongint div SizeOf(Single))-1] of Single;
29:   PSingleArray    = ^TSingleArray;
30: 
31: /// Complex Number type definitions
32:   TComplexExtended = record
33:     case integer of
34:       0: (r,fi:Extended;);  /// radius, angle    (r*exp(i*fi))
35:       1: (Re,Im:Extended;); /// Real, Imaginary  ( Re+i*Im )
36:       2: (C:array[0..1] of Extended;);
37:   end;
38:   TComplexDouble = record
39:     case integer of
40:       0: (r,fi:Double;);  /// radius, angle    (r*exp(i*fi))
41:       1: (Re,Im:Double;); /// Real, Imaginary  ( Re+i*Im )
42:       2: (C:array[0..1] of Double;);
43:   end;
44:   TComplexSingle = record
45:     case integer of
46:       0: (r,fi:Single;);  /// radius, angle    (r*exp(i*fi))
47:       1: (Re,Im:Single;); /// Real, Imaginary  ( Re+i*Im )
48:       2: (C:array[0..1] of Single;);
49:   end;
50: 
51:   PComplexExtended = ^TComplexExtended;
52:   PComplexDouble = ^TComplexDouble;
53:   PComplexSingle = ^TComplexSingle;
54: 
55:   TComplexExtendedArray = array[0..(MaxLongint div SizeOf(TComplexExtended))-1] of TComplexExtended;
56:   PComplexExtendedArray = ^TComplexExtendedArray;
57:   TComplexDoubleArray = array[0..(MaxLongint div SizeOf(TComplexDouble))-1] of TComplexDouble;
58:   PComplexDoubleArray = ^TComplexDoubleArray;
59:   TComplexSingleArray = array[0..(MaxLongint div SizeOf(TComplexSingle))-1] of TComplexSingle;
60:   PComplexSingleArray = ^TComplexSingleArray;
61: 
62: //  size_t = Integer; /// TSize is 2D in pixel size
63: 
64: implementation
65: 
66: end.