Copyright: (c) 1998 H. Lohninger, Vienna, Austria


 Common Math Constants

See also:	Delphi manual

The following often used constants are supplied with the unit Math1. The numeric constants are defined as extended numbers.

e           = 2.718281828459045235360   Euler's number e

etom1       = 0.367879441171442321596   1/e

lg2         = 0.301029995663981195214   common logarithm of 2

lg5         = 0.698970004336018804803   common logarithm of 5

lge         = 0.434294481903251827651   common logarithm of e

lgPi        = 0.497149872694133854351   common logarithm of Pi

ln10        = 2.302585092994045684018   natural logarithm of 10

ln2         = 0.693147180559945309417   natural logarithm of 2

lnPi        = 1.144729885849400174143   natural logarithm of Pi

PiH         = 1.570796326794896619231   Pi/2

PiSqr       = 9.869604401089358618834   Pi*Pi

Pitom1      = 0.318309886183790671538   1/Pi

sqrt2       = 1.414213562373095048802   square root of 2

GoldenR     = 1.618033988749894848205   golden ratio

MaxReal     = 1.7e38                    maximum real number

MaxSingle   = 3.4e38                    maximum single number

MaxDouble   = 1.7e308                   maximum double number

MaxExtended = 1.1e4932                  maximum extended number

MinReal     = 2.9e-39                   minimum real number

MinSingle   = 1.5e-45                   minimum real number

MinDouble   = 5.0e-324                  minimum real number

MinExtended = 3.6e-4951                 minimum real number


Type Declarations

FeedBackProcType

TRandGen

VarType


Miscellaneous Stuff

CountBits

CalcScalePars

MathFeedBackProc

ProcStat


Sorting

InsertIntoArray

SortArray

SortIntoArray


Comparison & Limiting

IntNeg

IntPos

Max

Min

sign

WithinBounds


Conversion

The following routines make some kind of conversion

from one numeric representation to another.

Bin

Decimal

DecodeBit

Exchange

GrayCode

Hex

MakeEFormat

Octal

ScanDecimal

ScanFPNum

ScanHex

ScanOctal

ScanBin

strf


Higher Mathematical Functions

These routines provide some of the transcendental functions

originally not supplied with Delphi or Borland Pascal

cosh

cot

ld

lg

sinh

tg

tgh


Random Generators

MATH1 offers several kinds of random generators,

among them a fully configurable random generator

which can generate any distribution of random numbers.

BRandom

GRandom

LongRand

configurable random generator RandGen:

Create

Destroy

Free

HighBorder

IndexOfLambda

Lambda

LowBorder

NormalDistri

Normalize

Probability

Random

Resolution

UniformDistri

WeibullDistri


 VarType

See also:	InsertIntoArray, SortArray, SortIntoArray

Class:	None

Declaration:	VarType = (rnum,inum,lnum,snum,dnum,Bool,strg);

The type VarType defines the type of the variable (real, integer, longint, single, double, boolean, and string) used in the sorting routines InsertIntoArray, SortIntoArray, and SortArray.

Hint:	Please mind the capital letter of ’Bool’. While this is no problem with Delphi, it is important for C++Builder programs, since the keyword ’bool’ is already used in C++.


Bin procedure
 Bin

See also:	Hex, Octal, Decimal, GrayCode, ScanBin

Class:	None

Declaration:	function Bin (innum: longint; places: byte): string;

The function Bin converts the integer number innum to an ASCII string which is the binary representation of that number. The number is written with a variable number of places, which can be defined by the parameter places (1..32). Leading nulls are not suppressed.

Hint:	If the value of the parameter places is less than one or greater than 32 the value is automatically restricted to these boundaries (whichever is next). If places does not suffice to display the binary representation, then the resulting string is truncated.

Example:	write (Bin (22,8)); writes the number 22 using binary notation with 8 characters ('00010110');


 BRandom

See Also:	TRandGen, GRandom, LongRand, Delphi random

Class:	None

Declaration:	function BRandom (p: double): boolean;

Sometimes it is convenient to have a function which returns a boolean value with a given probability. The function BRandom returns a TRUE with a probability p. p may have values in the range of 0.0 to 1.0; for values of p less than 0.0 or higher than 1.0 FALSE or TRUE are returned.

Hint:	BRandom is based on the built-in random generator of Delphi. So any flaw in this random generator will also emerge in the distribution of values of BRandom.


 CalcScalePars

See also:

Class:	None

Declaration:	CalcScalePars (Ntick: integer; LowVal, HighVal: real; varLowTick, Distance: real; var Divi: word);

The procedure CalcScalePars calculates the label parameters for an axis defined by its lower and upper boundaries (LowVal and HighVal) and the minimum number of ticks expected (NTick). From these parameters the routine calculates the value of the lowest tick (LowTick) and the distance between the ticks (Distance) in a way that these ticks are always located on numbers within the 1-2-5 scheme. In addition, CalcScalePars returns a proposal for the number of ticks between numeric labels (Divi).


Create (TRandGen)
 Create

See also:	Destroy, Free

Class:	TRandGen

Declaration:	constructor Create;

The call to the constructor Create instantiates an object of the class TRandGen and allocates the necessary heap memory. If there is not enough memory space on the heap, an exception is generated ('not enough memory on heap').

Hint:	The reference points of a newly created random generator are initialized to 1.0 (thus delivering a uniform distribution, by default).


 cosh

See also:	sinh, tgh

Class:	None

Declaration:	function cosh (x: double): double;

The function cosh calculates the hyperbolic cosine of x. Both the argument and the result are of the type double.


 CountBits

See also:	DecodeBit

Class:	None

Declaration:	function CountBits (InByte: byte): integer;

Explanation:	The function CountBits counts the number of 1 bits in the byte InByte and returns this number (0..7).


 cot

See also:	tg

Class:	None

Declaration:	function cot (x: double): double;

The function cot calculates the cotangens of x. Both the argument and the result are of the type double.


 Decimal

See also:	Hex, Octal, Bin, GrayCode, ScanDecimal, ScanFPNum

Class:	None

Declaration:	function Decimal (innum: longint; places: byte): string;

The function Decimal converts the integer number innum to an ASCII string which is the decimal representation of that number but the leading spaces replaced by zeros. The number is written with a variable number of places, which can be defined by the parameter places (1..255). A negative number will be displayed with a leading ‘-‘ sign, thus increasing the number characters output by one.

Hint:	If the value of the parameter places is less than one the value is automatically restriced to 1. If places does not suffice to display the decimal representation, the resulting string is truncated.

Example:	write (Decimal (2334,8)); writes the number 2334 using decimal notation with 8 characters and leading zeros ('00002334');


 DecodeBit

See also:	CountBits

Class:	None

Declaration:	function DecodeBit (ix: integer): byte;

Explanation:	The function DecodeBit returns a byte which has the bit with the number ix set and all other bits reset. A value of ix outside the valid range (0..7) results in a zero byte as function return.The least significant bit (LSB) has the number 0, the mostsignificant bit (MSB) has the number 7.


Destroy (TRandGen)
 Destroy

See also:	Create, Free

Class:	TRandGen

Declaration:	destructor Destroy;

The destructor Destroy releases the allocated memory and removes the object. Note that a better way for destroying an instance is the method Free.

Hint:	Destroy should be carried out whenever an object is not needed anymore in order to avoid unnecessary loading of the heap segment.


 ExChange

See also:	sizeof (Delphi manual)

Class:	None

Declaration:	procedure ExChange (var x,y; size: word);

The procedure ExChange exchanges the values of two variables. The variables can be of any type (not only numerical data types but also strings and records are allowed). The only requirement for a successful utilisation of ExChange is that the variables x and y are of the same size. The parameter size specifies the size of the two variables in bytes. The best way to determine the size of the variables is to use the Delphi function SizeOf.

Hint:	The variables x and y can be of different types as long as the size of them is equal. Example 2 shows an application of this case.

Example 1:	After the call of ExChange (a,b,sizeof(a)); the variables a and b are mutually exchanged.

Example 2: 	The sample code below shows the utilisation of the procedure ExChange for the dissection of a floating point number into single bytes. The same result could be obtained by an absolute declaration of two variables sharing the same address.

var

  r  : double;

  bf : array[1..sizeof(r)] of byte;

...

Exchange (r,bf,sizeof(r));

           { now the byte array bf contains the floating

             point number r, represented by 8 bytes }

...


 FeedBackProcType

See also:	ProcStat, MathFeedBackProc

Declaration:	FeedBackProcType = procedure (StateCnt: longint);

This procedure type is used as call-back routine in lengthy mathematical calculations.


Free (TRandGen)
 Free

See also:	Destroy, Delphi reference manual

Class:	TRandGen

Declaration:	procedure Free;

The Free method destroys the object and frees its associated memory. Free is successful even if the object is NIL. Thus if the object has never been initialized, for example, calling Free won't result in an error.


 GRandom

See Also:	TRandGen, LongRand, BRandom, Delphi random

Class:	None

Declaration:	function GRandom: double;

The function GRandom returns a normally distributed deviate with zero mean and unit variance. The distribution exhibits a Gaussian shape.

Hint:	GRandom is based on the built in random generator of Delphi. So any flaw in this random generator will also emerge in the distribution of values of GRandom.


 GrayCode

See also:	Hex, Octal, Decimal, Bin

Class:	None

Declaration:	function GrayCode (InNum: word): word;

The function GrayCode converts the 16-bit unsigned integer number InNum into the corresponding Gray code.

Example:	write (Bin (GrayCode(i),16)); displays the binary representation of the Gray code of the unsigned integer i.


 Hex

See also:	Bin, Octal, Decimal, GrayCode, ScanHex

Class:	None

Declaration:	function Hex (innum: longint; places: byte): string;

The function Hex converts the integer number innum to an ASCII string which is the hexadecimal representation of that number. The number is written with a variable number of places, which can be defined by the parameter places (1..8). Leading zeros are not suppressed.

Hint:	If the value of the parameter places is less than one or greater than eight the value is automatically restricted to these boundaries (whichever is next). If places does not suffice to display the hexadecimal representation, then the resulting string is truncated.

Example:	write (Hex (2334,4)); writes the number 2334 using hexadecimal notation with 4 characters ('091E');


HighBorder property
 HighBorder

See also:	LowBorder, Lambda, Resolution

Class:	TRandGen

Declaration:	property HighBorder: double;

The property HighBorder specifies the upper limit of the random numbers generated by TRandGen. Please note, that the user has to ensure that HighBorder is actually higher than LowBorder.


IndexOfLambda method
 IndexOfLambda

See also:	Lambda, Resolution

Class:	TRandGen

Declaration:	function IndexOfLambda (Lambda: double): integer;

The method IndexOfLambda returns the index of the corresponding reference point for a given Lambda. If Lambda is below LowBorder, then IndexOfLambda returns a zero value, if Lambda is greater than HighBorder, then IndexOfLambda returns the value 1+Resolution.


 InsertIntoArray

See also:	SortIntoArray, SortArray

Class:	None

Declaration:	InsertIntoArray (ArrayAdr: pointer; LengArray: longint; TypArray: VarType; value: pointer; index: longint);

The routine InsertIntoArray supports the insertion of a new element into a linear array. This routine needs the address, the type, and the value of the new element, the length of the array and the position where the new element should be inserted. InsertIntoArray shifts all elements from the position index one item back and stores the new element in the freed position. The last element of an array will be lost during this action.

The parameter  ArrayAdr holds a pointer to the array (use the operator @). The parameter LengArray defines the length of this array (i.e. the maximum number of elements of this array). The parameter LengArray may be defined smaller than the actual size of the array. In this case only the first LengArray elements are processed by InsertIntoArray.

The parameter TypArray defines the type of the array elements. The users should be aware that a wrong designation of the type of the array elements leads to severe errors and can cause a system crash. The following types are valid: inum (integer), lnum (longint), snum (single), dnum (double), and rnum (real); the types strg (string) and bool (boolean) are not supported.

The pointer value holds the address of the variable whose value should be inserted. This variable has to be of the same type as the elements of the array. The parameter index specifies the position where to insert the value. If index is larger than LengArray the new value is not inserted.

Hint:	The procedure InsertIntoArray can be used to index a sorted array (see example program SORTINTO.PAS).

Example:	The statement InsertIntoArray (@rfeld, 100, rnum, @newval, 12); inserts the real number newval into the array rfeld on position 12.


 IntNeg

See also:	IntPos

Class:	None

Declaration:	function IntNeg (InNum: double): longint;

The Pascal functions int and trunc do not process negative and positive numbers in the same way (they are biased towards 0.0), which can cause trouble in some circumstances. Therefore IntNeg consistently produces the next smaller integer value, regardless of the sign of the number InNum.


 IntPos

See also:	IntNeg

Class:	None

Declaration:	function IntPos (InNum: double): longint;

The Pascal functions int and trunc do not process negative and positive numbers in the same way (they are biased towards 0.0), which can cause trouble in some circumstances. Therefore IntPos consistently produces the next integer value which is greater or euqal to InNum, regardless of the sign of the number InNum.


Lambda property
 Lambda

See also:	IndexOfLambda, Probability, Resolution

Class:	TRandGen

Declaration:	property Lambda[ix: integer]: double;

The read-only property Lambda returns the x-value of the reference point indexed by the parameter ix. If ix is specified outside its valid range (1..Resolution), LowBorder or HighBorder is returned.


ld

See also:	ln (Delphi), lg

Class:	None

Declaration:	function ld (x: double): double;

The function ld calculates the base 2 logarithm of x. Both the argument and the result are of the type double.

Example:	The statement  write(ld(a)); displays the base 2 logarithm of a.


 lg

See also:	ln (Delphi), ld

Class:	None

Declaration:	function lg (x: double): double;

The function lg calculates the common logarithm of x. Both the argument and the result are of the type double.

Example:	The statement  write(lg(a)); displays the common logarithm of a.


 LongRand

See Also:	TRandGen, BRandom, GRandom, Delphi random

Class:	None

Declaration:	function LongRand (seed: longint): double;

For many applications (e.g. data encryption) it would be necessary to have a portable random generator of sufficient period length. The random generator used in LongRand is based on three combined linear congruential generators which are designed in such a way that the period length of the resulting pseudo-random sequence is about 3.47*10E17.

The parameter seed is used to initialise the random generator when a non-zero value is passed to it. If seed equals zero then the random generator produces a pseudo-random sequence of floating point numbers in the interval of [0.0,1.0].


LowBorder property
 LowBorder

See also:	HighBorder, Lambda, Resolution

Class:	TRandGen

Declaration:	property LowBorder: double;

The property LowBorder specifies the lower limit of the random numbers generated by TRandGen. Please note, that the user has to ensure that LowBorder is actually lower than HighBorder.


 MakeEFormat

See also:	strf

Class:	None

Declaration:	function MakeEFormat (x:double; w,d: integer): string;

Since the exponential notation of numeric values differ between FORTRAN and Pascal there may be some problems when it comes to exchange data between FORTRAN and Pascal programs. The function MakeEFormat provides a partial remedy for this situation.

The parameters w and d determine the width of the numeric field and the number of decimal places. w may take values between 8 and 40, d between 2 and 15. If a conflict arises from the actual values of w and d, the parameter w is automatically adjusted in a way that all decimal places d can be output correctly.

Hint:	The output with only one decimal place is not possible.

Example:	The statement "writeln (MakeEFormat (0.0236,16,5);" displays the number 0.0236 as '    0.23600E-01'.


 MathFeedBackProc

See also:	ProcStat

Declaration:	MathFeedBackProc : FeedBackProcType;

Some math calculations can consume a lot of computer time during which the application may show no reaction. In order to avoid this unfavourable situation, all the potentially time-consuming routines (i.e. SortArray, CalcCovar, CalcEigVec, CalcPrincComp, and FindCenters) call the special procedure MathFeedBackProc at regular intervals. The global variable ProcStat is automatically incremented and passed as a parameter to MathFeedBackProc.

The procedure MathFeedBackProc is in fact a procedure pointer which is initially set to NIL. The user may assign any procedure of the type FeedBackProcType to it.

Below you find short instructions how to implement a call-back routine:

1.	Declare the routine which does the actual feedback (e.g. showing a progress bar, or something like that). This procedure has to have exactly the same declaration as FeedBackProcType. Don't forget to declare this procedure as far:

procedure ShowProgress (cnt: longint); far;

begin      { here the display of the progress takes place }

Form1.Label1.Caption := IntToStr (cnt);

Application.ProcessMessages;

end;

Note, that the cnt parameter of the call back procedure passes the value of the variable ProcStat.

2.	Before starting the time-consuming math procedure (FindCenters, in this example), assign the feedback procedure to the procedure variable MathFeedbackProc. You should also set the variable ProcStat to some defined value. After the completion of the time-consuming procedure you may reset the MathFeedbackProc to NIL.

...

ProcStat := 0;

MathFeedbackProc := ShowProgress;

FindCenters (Data, 1, Data.NrOfRows, NCenters, Centers, Md);

MathFeedbackProc := NIL;

...

Hint 1:	An example how to implement a call-back routine can also be found in the sample program FINDCENT.DPR (delivered with unit MATH2).

Hint 2:	Alternatively, you can use a timer interrupt which displays the contents of the variable ProcStat to display the progress of some calculation.


 Max

See also:	Min, WithinBounds

Class:	None

Declaration:	function Max (a, b: double): double;

The function Max returns the maximum of two floating point numbers 'a' and 'b'.

Example:	The statement "Max (3,12.2)" returns the value 12.2.


 Min

See also:	Max, WithinBounds

Class:	None

Declaration:	function Min (a, b: double): double;

The function Min returns the minimum of two floating point numbers 'a' and 'b'.

Example:	The statement "Min (3,12.2)" returns the value 3.0.


NormlDistri method
 NormalDistri

See also:	Probability, UniformDistri, WeibullDistri

Class:	TRandGen

Declaration:	procedure NormalDistri (m, s: double);

The method NormalDistri sets the reference points of the random generator in a way so that the delivered random numbers are normally distributed with a mean value of m and a standard deviation of s.

Hint 1:	The properties LowBorder and HighBorder cut the distribution (any values of the probability function outside of those limits are zero). Thus, be careful to set these properties in a way that the normal distribution does not interfere with them.

Hint 2:	Changing the borders of the random generator also shifts the mean value and the standard deviation of the normal distribution. Therefore LowBorder and HighBorder should be set before applying NormalDistri.


Normalize method
Normalize

See also:	Probability

Class:	TRandGen

Declaration:	procedure Normalize;

The method Normalize scales the reference points of the random generator for a maximum value of 1.00. The procedure Normalize should be applied after entering new reference points in order to ensure that the random number generation is correct (and most effective).


 Octal

See also:	Hex, Bin, Decimal, GrayCode, ScanOctal

Class:	None

Declaration:	function Octal (innum: longint; places: byte): string;

The function Octal returns a string which represents the integer number 'innum' in octal notation. The resulting octal number will be created using 'places' digits, any leading zeros will be filled in. The parameter 'places' may take values between 1 and 8.

Hint:	If the parameter 'places' is specified smaller than 1 or larger than 8 'places' will be automatically confined to these values without any notification. If 'places' is too small to create the octal representation of 'innum' correctly the resulting string will be truncated.

Example:	The statement "write (Octal (2334,5));" displays the number 2334 in octal notation using five digits ('04436');


Probability property
 Probability

See also:	UniformDistri, NormalDistri

Class:	TRandGen

Declaration:	property Probability[ix: integer]: double;

The array property Probability defines the evenly distributed reference points for the probability distribution function. The parameter ix runs from 1 to Resolution and is an index into the Probability array. The reference points are located at the left (lower) side of each interval. The probability within one interval is interpolated between its reference point and the reference point of the next interval. The probability of the last interval is extrapolated towards zero.

After changing the Probability property, the method Normalize should be called in order to ensure that the probabilities are scaled to values between 0.0 and 1.0.

Hint:	The array property Probability does not form some kind of probability density function. The maximum value of all entries in this array should always equal 1.0.


 ProcStat

See also:	MathFeedBackProc

Declaration:	ProcStat: longint;

This globally defined variable serves as a means for communicating the state of some potentially lengthy calculations to the outside world. It is incremented on a regular basis by certain routines (i.e. SortArray, CalcCovar, CalcEigVec, CalcPrincComp, and FindCenters). Thus a timer interrupt routine can access this variable and display its value during the calculations. This method provides an efficient way to check whether the system hangs or is involved in lengthy calculations. The initialization of ProcStat is left up to the user.

Alternatively, a routine showing the progress of some calculation can be assigned to the call-back routine MathFeedBackProc. This routine is called whenever ProcStat is increased.


 RandGen

See also:	LongRand, BRandom, GRandom, Delphi random

The configurable random generator RandGen returns random numbers of a predefined distribution. The user may define the shape of the probability distribution as well as the range of the random numbers. The shape of the probability distribution function is defined by a series of reference points. The number of reference points can be adjusted by the property Resolution and may take any value between 10 and 4000 points. The default value of 500 is sufficiently accurate for most purposes.

Random numbers can be generated by calling the method random. The range of the generated random numbers is defined by the properties LowBorder and HighBorder. Numbers less than LowBorder and greater than HighBorder have a zero probability to be generated. The probabilities of the random numbers within the specified range are defined by the array property Probability. The index of this property runs from 1 to Resolution and defines the evenly spaced reference points of the probability distribution. The reference points can be set up either by loading the Probability array, or by calling one of the built-in distribution functions (i.e. NormalDistri, or UniformDistri). After changing the Probability property, the method Normalize should be called in order to ensure that the probabilities are scaled to values between 0.0 and 1.0. The x-value associated with a given reference point can be obtained by the read-only property Lambda.

The figure below shows, as an example, the distribution function created by only 10 reference points between -300 and +300. Please note, that the range defined by LowBorder and HighBorder is divided into Resolution (10) intervals. The reference points are located at the lower side of each interval. The probability within one interval is interpolated between its reference point and the reference point of the next interval. The probability of the last interval is extrapolated towards zero.

Here's a simple example how to apply the random generator:

var

  RandGen : TRandGen;

  rn      : double;

  i       : integer;

begin

RandGen := TRandGen.Create;              { create an instance }

RandGen.Resolution := 1000;    { set the resolution as needed }

RandGen.LowBorder := 0;                         { lower limit }

RandGen.HighBorder :=100;	{ upper limit of random numbers }

RandGen.NormalDistri (50,15);  { define a normal distribution }

for i:=1 to 100 do

  begin

  rn := RandGen.Random;           { create 100 random numbers }

  (*... process random numbers ...*)       { and process them }

  end;

RandGen.Free;                      { dispose random generator }

end;


Random property
 Random

See also:	Probability, system.random (Delphi library)

Class:	TRandGen

Declaration:	property Random: double;

The read-only property Random returns a random number within the range LowBorder ... HighBorder using the probability distribution defined by the array property Probability.

The figure below shows the result of 20000 calls to Random with a bimodal distribution defined by 500 reference points. The returned random numbers are indicated by the gray histogram. The blue line shows the underlying probability distribution.


 ScanBin

See also:	ScanHex, ScanDecimal, ScanFPNum, ScanOctal, Bin

Class:	none

Declaration:	function ScanBin (Instring: string; var Idx: integer): longint;

The function ScanBin decodes a binary number from a string. The parameter Instring contains the binary number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’, ’1’, and leading blanks.

On return, ScanBin contains the corresponding integer number, and the variable parameter Idx points to the first character after the scanned number. If the binary number constitutes the final part of the string, Idx points to 1+length(Instring).


 ScanDecimal

See also:	ScanFPNum, ScanHex, Decimal, ScanOctal, ScanBin

Class:	none

Declaration:	function ScanDecimal (Instring: string; var Idx: integer): longint;

The function ScanDecimal decodes a decimal number from a string. The parameter Instring contains the decimal number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’...’9’, leading ‘-‘ and ‘+’ signs, and leading blanks.

On return, ScanDecimal contains the corresponding integer number, and the variable parameter Idx points to the first character after the scanned number. If the decimal number constitutes the final part of the string, Idx points to 1+length(Instring).


 ScanFPNum

See also:	strf, ScanHex, Decimal, ScanOctal, ScanBin

Class:	none

Declaration:	function ScanFPNum (Instring: string; AllowExp: boolean; DecPChar: integer; var Idx: integer): double;

The function ScanFPNum decodes a decimal floating point number from a string. The parameter Instring contains the decimal number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’...’9’, ‘E’, ‘.’, leading ‘-‘ and ‘+’ signs, and leading blanks. If the parameter AllowExp is set TRUE the scanned number may be optionally stored in exponential notation. The parameter DecPChar determines which character is accepted as decimal separator:

DecPChar	accepted character

1	dot

2	colon

3	both

On return, ScanFPNum contains the corresponding floating point number, and the variable parameter Idx points to the first character after the scanned number. If the number constitutes the final part of the string, Idx points to 1+length(Instring).


 ScanHex

See also:	Hex, ScanDecimal, ScanFPNum, ScanOctal, ScanBin

Class:	none

Declaration:	function ScanHex (Instring: string; var Idx: integer): longint;

The function ScanHex decodes a hexadecimal number from a string. The parameter Instring contains the hexadecimal number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’...’9’, and the characters ‘A’...’F’, and leading blanks.

On return, ScanHex contains the corresponding integer number, and the variable parameter Idx points to the first character after the scanned number. If the hexadecimal number constitutes the final part of the string, Idx points to 1+length(Instring).


 ScanOctal

See also:	ScanHex, ScanDecimal, ScanFPNum, Octal, ScanBin

Class:	none

Declaration:	function ScanOctal (Instring: string; var Idx: integer): longint;

The function ScanOctal decodes a octal number from a string. The parameter Instring contains the octal number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’...’7’, and leading blanks.

On return, ScanOctal contains the corresponding integer number, and the variable parameter Idx points to the first character after the scanned number. If the octal number constitutes the final part of the string, Idx points to 1+length(Instring).


Reference Points of TRandGen

The idea behind RandGen: the probability distribution function of the

random numbers to be generated is defined by an array of equidistant

reference points. These reference points define the probability of the

generated random numbers for a given interval on the x-axis. The

probability within the interval to the next (upper) reference point is

interpolated linearly.


Resolution property
 Resolution

See also:	Probability, Lambda

Class:	TRandGen

Declaration:	property Resolution: integer;

The property Resolution determines the number of reference points used for the simulation of a probability distribution. Resolution can assume any value between 10 and 4000, the default value is 500.

Hint:	Setting a new Resolution value destroys the currently loaded probability distribution and resets the probabilities of all reference points to 1.0 (resulting in an equal distribution over the whole range of the random generator).


 Sign

See also:

Class:	None

Declaration:	function Sign (a: double): integer;

The function Sign evaluates the sign of the floating point number 'a' and returns either +1 or -1.

Example:	The term "Sign (-3.3)" returns the value -1.


 sinh

See also:	cosh, tgh

Class:	None

Declaration:	function sinh (x: double): double;

The function sinh calculates the hyperbolic sinus of 'x'. Both the argument and the result are of the type 'double'.


 SortArray

See also:	SortIntoArray, InsertIntoArray

Class:	None

Declaration:	SortArray (ArrayAdr: pointer; LengArray: longint; TypArray: VarType; Ascending: boolean);

The procedure SortArray sorts a one-dimensional numeric array either ascending or descending. This routine uses a modified bubble sort ('CompSort') algorithm, which is superior to 'QuickSort' in many cases.

The parameter  ArrayAdr holds a pointer to the array (use the operator '@'). The parameter LengArray defines the length of this array (i.e. the maximum number of elements of this array). The parameter LengArray may be defined smaller than the actual size of the array. In this case only the first LengArray elements are processed by SortArray.

The parameter TypArray defines the type of the array elements. The users should be aware that a wrong designation of the type of the array elements leads to severe errors and can cause a system crash. The following types are valid: inum (integer), lnum (longint), snum (single), dnum (double), and rnum (real); the types strg (string) and bool (boolean) are not supported.

The parameter Ascending specifies whether the array should be sorted by ascending (TRUE) or descending (FALSE) values.

SortArray increments the global variable ProcStat and calls the feedback routine MathFeedBackProc in order to allow feedback to the user during time consuming calculations.

Hint:	If only part of the array is to be sorted the user can pass the address of the first element to be included in the parameter ArrayAdr and set the parameter LengArray to the number of elements to be included.

Example:	The statement  SortArray (@rfeld, 100, rnum, true); sorts the first 100 floating point numbers with the array rfeld by ascending values.


 SortIntoArray

See also:	InsertIntoArray, SortArray

Class:	None

Declaration:	function SortIntoArray (ArrayAdr: pointer; LengArray: longint; TypArray: VarType; value: pointer; Ascending: boolean; duplicates: boolean): longint;

Sometimes it is necessary to insert new values into an already sorted numeric array. The routine SortIntoArray offers this type of processing. First, it calculates the would-be position of the new element within the sorted array. If this position is within the limits of the sorted array, the routine shifts all values after the calculated position back and inserts the new value there. The following parameters are needed for a call to SortIntoArray.

ArrayAdr is a pointer to the sorted array. This array must be declared as an one-dimensional numeric array. The array elements may be of type integer, longint, or real.

LengArray determines the length of the sorted array (the number of elements of this array). If only part of the array is to be sorted, LengArray can be reduced appropriate. ATTENTION ! If LengArray is set to a value beyond the declared size of the array this will lead to unpredictable errors, since neighbouring variables will be overwritten.

The parameter TypArray specifies the type of the elements of the arrays well as the type of the values to be sorted into the array. The user should be aware that a wrong designation of the type of the array elements leads to severe errors and can cause a system crash. The following types are valid: inum (integer), lnum (longint), snum (single), dnum (double), and rnum (real), the types strg (string) and bool (boolean) are not supported.

The pointer value holds the address of the variable whose value should be inserted. This variable has to be of the same type as the elements of the array.

The parameter Ascending specifies whether the array should be sorted by ascending (TRUE) or descending (FALSE) values.

If the parameter duplicates is set TRUE values will be inserted, even if the same value is already stored in the array.

The function SortIntoArray returns the index of the inserted value. If the number could not be inserted SortIntoArray returns a zero value.

Hint 1:	The should take notice of the fact that the routine SortIntoArray can insert the new value only if the first value of the array is below (Ascending = TRUE) or above (Ascending = FALSE) the new value. This is especially important for the correct initialisation of an array.

Hint 2:	The function SortIntoArray can be used to create an ordered list of minimum or maximum values of a larger list of values.

Example:	SORTINTO.PAS


 strf

See Also:	strff, MakeEFormat, ScanFPNum, Delphi procedure str

Class:	None

Declaration:	function strf (r: double; FieldWidth, DecP: integer): string;

This function has been moved to the unit STRINGL, using the new identifier strff (string format function). For compatibility issues, the old strf is still available in unit MATH1, but no longer supported. You should use strff for future developments.


 tg

See also:	cot

Class:	None

Declaration:	function tg (x: double): double;

The function tg calculates the tangens of 'x'. Both the argument and the result are of the type 'double'.


 tgh

See also:	sinh, cosh

Class:	None

Declaration:	function tgh (x: double): double;

The function tgh calculates the hyperbolic tangens of x. Both the argument and the result are of the type 'double'.


UniformDistri method
 UniformDistri

See also:	Probability, NormalDistri

Class:	TRandGen

Declaration:	procedure UniformDistri;

The method UniformDistri sets all elements of the array property Probability to a constant value of 1.0. This results in a random generator which generates evenly distributed random numbers in the interval between LowBorder and HighBorder.


WeibullDistri method
 WeibullDistri

See also:	Probability, NormalDistri

Class:	TRandGen

Declaration:	procedure WeibullDistri (alpha, beta: double);

The method WeibullDistri sets all elements of the array property Probability in a way that the delivered random numbers are distributed according to a Weibull distribution with parameters alpha and beta.


 WithinBounds

See also:	Min, Max

Class:	None

Declaration:	function WithinBounds (Inval, Boundary1, Boundary2: double): boolean;

The function WithinBounds compares the value Inval to the interval which is spanned by the boundaries Boundary1 and Boundary2. It returns a TRUE value if the value Inval lies within the interval. The two boundary values may be exchanged without affecting the result.


 Registration of Math1

See also:	How to order

The unit Math1 is a shareware component. You can register it for US$ 10,-. In return, you get the newest version of Math1 and unlimited free updates by email. The registered version is, of course, fully functional and does no longer need the Delphi, or the C++Builder IDE. The user may then create stand-alone programs which can be deployed without paying any further licences.

Please note, that the sources of Math1 are available separately at a price of US$ 30,-

 Click here for further details and infos on available discounts.


Example program SORTINTO.PAS (Borland Pascal)

See also:	SortArray, SortIntoArray, InsertIntoArray

The program SORTINTO.PAS shows the application of the procedures SortArray ,SortIntoArray, InsertIntoArray on the calculation of the smallest value of a series of numbers. Out of the input numbers the 17 smallest numbers are shown on the screen.

program sortinto;

uses

  crt, math1;

const

  MaxNum = 17;

var

  ra      : array[1..MaxNum] of real;

  raix    : array[1..MaxNum] of integer;

  newval  : real;

  cnt     : integer;

  index   : word;

  EndProg : boolean;

procedure DisplayArray;

(*-------------------*)

var

  i : integer;

begin

gotoxy (7,1);

write ('sorted Array          Index');

for i:=1 to MaxNum do

  begin

  gotoxy (10,i+1);

  write (ra[i]:10:2, '   ',raix[i]:10);

  end;

end;

begin

ClrScr;

for cnt:=1 to MaxNum do

  begin

  ra[cnt] := 1000.0*random;

  raix[cnt] := cnt;

  end;

SortArray (addr(ra),MaxNum,rnum,true);

DisplayArray;

EndProg := false;

repeat

  gotoxy (1,23); DelLine; DelLine;

  gotoxy (1,24);

  write ('(ABORT: Enter any character)');

  gotoxy (1,23);

  write ('Enter a number to be sorted into the array: ');

  {$I-} read (newval); {$I+}

  if IoResult <> 0

    then EndProg := True

    else begin

         index := SortIntoArray (addr(ra),MaxNum,rnum,

                                 addr(newval),true,true);

         if index > 0

           then begin

                inc (cnt);

                InsertIntoArray (addr(raix),MaxNum,inum,

                                 addr(cnt),index);

                DisplayArray;

                end

           else begin

                gotoxy (1,23); DelLine; DelLine;

                write ('Number to large - press <ESC> to continue');

                repeat until readkey = #27;

                end;

         end;

until EndProg;

end.


 Installation of Math1

See also:	Delphi and C++Builder Issues

The installation of the unit is a two-part process. First you have to copy the DCU file(s) to the Delphi (C++ Builder) library. Secondly, you should install the help file of this component into the help system of Delphi (C++ Builder).

Note:	The unit MATH1 is not a visual component. You therefore cannot install it in the VCL palette. The routines of MATH1 are used by including MATH1 into the 'uses' statement of your program.

Delphi installation

C++ Builder installation


 Interface of Math1

Note: you may have to switch to small fonts to get a legible interface list.

const

  e           : extended = 2.718281828459045235360;

  etom1       : extended = 0.367879441171442321596;

  lg2         : extended = 0.301029995663981195214;

  lg5         : extended = 0.698970004336018804803;

  lge         : extended = 0.434294481903251827651;

  lgPi        : extended = 0.497149872694133854351;

  ln10        : extended = 2.302585092994045684018;

  ln2         : extended = 0.693147180559945309417;

  lnPi        : extended = 1.144729885849400174143;

  PiH         : extended = 1.570796326794896619231;

  PiSqr       : extended = 9.869604401089358618834;

  Pitom1      : extended = 0.318309886183790671538;

  sqrt2       : extended = 1.414213562373095048801;

  sqrt2pi     : extended = 2.506628274631000502416;

  sqrt2pitom1 : extended = 0.3989422804014326779399;

  GoldenR     : extended = 1.618033988749894848204;

{$I ntminmax.inc}

type

  FeedBackProcType = procedure (StateCnt: longint);  { general procedure type for callback routines }

  VarType = (rnum,dnum,snum,inum,lnum,Bool,strg);

  TRandGen = class (TObject)

            private

               FLowBorder         : double;

               FHighBorder        : double;

               FResolution        : integer;

               FDistVec           : pointer;

               procedure SetResolution (res: integer);

               function  GetProbability (Idx: integer): double;

               function  GetRandNum: double;

               function  GetLambda (ix: integer): double;

               procedure SetProbability (Idx: integer; Value: double);

             public

               constructor Create;

               destructor Destroy; override;

               property  HighBorder: double read FHighBorder write FHighBorder;

               property  Lambda[ix: integer]: double read GetLambda;

               property  LowBorder: double read FLowBorder write FLowBorder;

               procedure Normalize;

               procedure NormalDistri (m, s: double);

               property  Probability[ix: integer]: double read GetProbability write SetProbability;

               property  Random: double read GetRandNum;

               function  IndexOfLambda (Lambda: double): integer;

               property  Resolution: integer read FResolution write SetResolution;

               procedure UniformDistri;

               procedure WeibullDistri (alpha, beta: double);

             end;

{procedures and functions}

  function  Bin

               (innum : longint;      { number to convert to binary string }

               places : byte)                           { number of places }

                      : string;                            { binary number }

  function  BRandom

                   (p : double)                              { probability }

                      : boolean;                 { TRUE with probability p }

  procedure CalcScalePars

               (Ntick : integer;                { number of ticks on scale }

               LowVal,                              { beginning of scaling }

              HighVal : double;                     { end point of scaling }

          var LowTick,                               { first tick on scale }

             Distance : double;                  { distance of scale ticks }

             var Divi : word);   { nr. of divisions between scaling labels }

  function  cosh

                   (x : double)                         { angle in radians }

                      : double;                        { hyperbolic cosine }

  function  cot

                   (x : double)                         { angle in radians }

                      : double;                                { cotangens }

  function  CountBits

             (InByte : byte)                       { byte to count bits in }

                     : integer;                           { number of bits }

  function  Decimal

               (innum : longint;     { number to convert to decimal string }

               places : byte)                           { number of places }

                      : string;           { decimal string with leading 0s }

  function  DecodeBit

                 (ix : integer)                     { number of bit (0..7) }

                     : byte;                    { byte holding decoded bit }

  procedure ExChange

             (var x,y;                        { pair of variables, untyped }

                 size : word);                        { length of variable }

  function  GRandom

                      : double;                           { Gaussian noise }

  function  GrayCode

               (InNum : word)                          { number to convert }

                      : word;                       { Gray code of 'InNum' }

  function  Hex

               (innum : longint;         { number to convert to hex string }

               places : byte)                           { number of places }

                      : string;                     { hexadecimal notation }

  procedure InsertIntoArray

            (ArrayAdr : pointer;                        { pointer to array }

            LengArray : longint;                         { length of array }

             TypArray : VarType;                           { type of field }

                value : pointer;                 { value to put into array }

                index : longint);                                  { index }

  function  IntPos

               (InNum : double)                        { number to process }

                      : longint;     { next integer greater/equal to InNum }

  function  IntNeg

               (InNum : double)                        { number to process }

                      : longint;     { next integer smaller/equal to InNum }

  function  lg

                   (x : double)                                 { argument }

                      : double;                         { common logarithm }

  function  ld

                   (x : double)                                 { argument }

                      : double;                       { logarithmus dualis }

  function  LongRand

                (seed : longint)                       { if <> 0 then init }

                      : double;                   { random value [0.0,1.0] }

  function  MakeEFormat

                   (x : double;                        { number to convert }

                  w,d : integer)                   { width, decimal places }

                      : string;                 { string in FORTRAN format }

  function  Max

                 (a,b : double)                          { input variables }

                      : double;                       { maximum of a and b }

  function  Min

                 (a,b : double)                          { input variables }

                      : double;                       { minimum of a and b }

  function  Octal

               (innum : longint;          { nr. to convert to octal string }

               places : byte)                           { number of places }

                      : string;                           { octal notation }

  function  ScanBin

            (Instring : string;          { string containing binary number }

              var Idx : integer)    { starting position of binary decoding }

                      : longint;                                  { result }

  function  ScanDecimal

            (Instring : string;         { string containing decimal number }

              var Idx : integer)   { starting position of decimal decoding }

                      : longint;                                  { result }

  function  ScanFPNum

            (Instring : string;        { string with floating point number }

             AllowExp : boolean;        { TRUE: allow exponential notation }

             DecPChar : integer;                    { dec. point character }

              var Idx : integer)   { starting position of decimal decoding }

                      : double;                                   { result }

  function  ScanHex

            (Instring : string;     { string containing hexadecimal number }

              var Idx : integer)       { starting position of hex decoding }

                      : longint;                                  { result }

  function  ScanOctal

            (Instring : string;           { string containing octal number }

              var Idx : integer)     { starting position of octal decoding }

                      : longint;                                  { result }

  function  Sign

                   (a : double)                           { input variable }

                      : integer;                               { signum(a) }

  function  sinh

                   (x : double)                         { angle in radians }

                      : double;                       { sinus hyperbolicus }

  procedure SortArray

            (ArrayAdr : pointer;                        { pointer to array }

            LengArray : longint;                         { length of array }

             TypArray : VarType;                           { type of array }

            Ascending : boolean);                       { TRUE = ascending }

  function  SortIntoArray

            (ArrayAdr : pointer;                        { pointer to array }

            LengArray : longint;                         { length of array }

             TypArray : VarType;                           { type of array }

                value : pointer;                      { value to sort into }

            Ascending : boolean;                        { TRUE = ascending }

           Dublicates : boolean)               { TRUE = dublicates allowed }

                      : longint;                          { index of value }

  function  strf

                   (r : double;                        { number to convert }

           FieldWidth : integer;                   { width of output field }

                 DecP : integer)                   { number of dec. places }

                      : string;                         { formatted string }

  function  tg

                   (x : double)                         { angle in radians }

                      : double;                                  { tangens }

  function  tgh

                   (x : double)                         { angle in radians }

                      : double;                     { tangens hyperbolicus }

  function  WithinBounds

               (Inval : double;                         { value to compare }

            Boundary1 : double;                   { boundary 1 of interval }

            Boundary2 : double)                   { boundary 2 of interval }

                      : boolean;             { TRUE if Inval within bounds }

  var

    ProcStat         : longint;                   { state of process }

    MathFeedBackProc : FeedBackProcType;  { global math feedback procedure }

                  { this callback procedure should be declared in the

                    application program which uses the time-consuming

                    math routines. It has to be of type 'FeedBackProcType'

                    and gets the value of variable 'ProcStat' passed.

                    In its body this routine uses to value of 'cnt' to

                    display the status of a math routine. The feedback

                    routine can be switched off by assigning a NIL pointer

                    to it }


MATH1
Math1 - Version 1.7

The unit MATH1 offers several fundamental arithmetic operators and mathematical/logical routines which have not been implemented in Delphi (e.g. hyperbolic functions, tangens, cotangens, or common logarithm). The unit also contains routines to sort data, to produce different numeric formats, to generate random numbers of special distributions, etc. In addition, a special version of the Delphi str procedure is offered which is declared as a function returning the formatted string. This considerably eases the display of numeric values.

Math1 is released under the shareware concept. The unregistered version is fully functional with one exception: the shareware version runs properly only when the Delphi, or C++Builder IDE is also up and running.

Product Information

Interface of Unit Math1

Installing MATH1

Delphi and C++Builder issues

Frequently Asked Questions

Detailed description of the routines in MATH1:

Common Constants

Type Declarations

Conversion

Comparison & Limiting

Higher Mathematical Functions

Random Generators

Sorting

Miscellaneous Stuff


MathFeedBackProc [Math1]
 MathFeedBackProc

This routine is part of the unit MATH1

For technical reasons the help file for unit MATH1 is a separate file. You may obtain further information either by using the help file MATH1.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


MouseAction [RChart]
 MouseAction

This routine is part of the unit RCHART

For technical reasons the help file for unit RCHART is a separate file. You may obtain further information either by using the help file RCHART.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


ProcStat [Math1]
 ProcStat

This routine is part of the unit MATH1

For technical reasons the help file for unit MATH1 is a separate file. You may obtain further information either by using the help file MATH1.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


Installation [RChart]
 Installation of RChart

This routine is part of the unit RCHART

For technical reasons the help file for unit RCHART is a separate file. You may obtain further information either by using the help file RCHART.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


SetRange [RChart]
 SetRange

This routine is part of the unit RCHART

For technical reasons the help file for unit RCHART is a separate file. You may obtain further information either by using the help file RCHART.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


ShowGraf [RChart]
 ShowGraf

This routine is part of the unit RCHART

For technical reasons the help file for unit RCHART is a separate file. You may obtain further information either by using the help file RCHART.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


AutoRedraw [RChart]
 AutoRedraw

This routine is part of the unit RCHART

For technical reasons the help file for unit RCHART is a separate file. You may obtain further information either by using the help file RCHART.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


CalcPrincComp [Math2]
 CalcPrincComp

This routine is part of the unit MATH2

For technical reasons the help file for unit MATH2 is a separate file. You may obtain further information either by using the help file MATH2.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


Create [Matrix]
 Create

This routine is part of the unit MATRIX

For technical reasons the help file for unit MATH2 is a separate file. You may obtain further information either by using the help file MATH2.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


TDistMode [Matrix]
 TDistMode

This routine is part of the unit MATRIX

For technical reasons the help file for unit MATRIX is a separate file. You may obtain further information either by using the help file MATRIX.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/

----------

Declaration:	TDistMode = (dmJaccard, dmManhattan, dmEuclid, dmEuclidSqr);

The type declaration TDistMode defines the possible operating modes of the method CalcDistMat. Currently the following distances can be calculated:

dmJaccard	similarity measure first defined by P. Jaccard (sometimes also referred to as Tanimoto coefficient)

dmManhattan	Manhattan or city block distance

dmEuclid	Euclidean distance

dmEuclidSqr	squared Euclidean distance


CalcCovar [Math2]
 CalcCovar

This routine is part of the unit MATH2

For technical reasons the help file for unit MATH2 is a separate file. You may obtain further information either by using the help file MATH2.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


CalcEigVec [Math2]
 CalcEigVec

This routine is part of the unit MATH2

For technical reasons the help file for unit MATH2 is a separate file. You may obtain further information either by using the help file MATH2.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


FindCenters [Math2]
 FindCenters

This routine is part of the unit MATH2

For technical reasons the help file for unit MATH2 is a separate file. You may obtain further information either by using the help file MATH2.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


strff [StringL]
 strff

This routine is part of the unit STRINGL

For technical reasons the help file for unit STRINGL is a separate file. You may obtain further information either by using the help file STRINGL.HLP, or by using the SDL component suite help SDLSUITE.HLP. Both files can be downloaded from our webserver http://www.lohninger.com/


Unit Plot3D
Plot3D

The unit Plot3D contains a Delphi / C++ Builder visual component which supports the display of three dimensioal surfaces. The surfaces are defined by a rectangular grid of height values, and can be viewed from any angle and in any direction. numeric labels. The component TPlot3D comes together with this help file and a sample program (both Pascal and C++).

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Kohonen
Kohonen

The unit KOHONEN provides a selforganizing map (SOM) as it has been described by Teuvo Kohonen. These SOMs are also known as Kohonen maps, or Kohonen neural networks. The unit KOHONEN contains the class TKohonen which simulates a Kohonen neural network.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Statis
Statis

The unit STATIS offers some of the most fundamental procedures of mathematical statistics. Along with the Gamma and the Beta function, all major types of distributions are implemented (normal, t, F, and chi-square distribution). A major benefit of this package is that the distribution functions are calculated analytically and not by approximations, or by table lookup. Thus the precision is at least eight digits.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit CData
CData

The unit CDATA consists of some important chemical data tables and conversion routines as well as some basic routines processing chemical information. Among these are the conversion of atom symbols to atomic numbers, the chemical atomic weight of all chemical elements, the atom symbols of all elements, the atomic weight of the most abundant isotope of each chemical element, the support of a graphical display of a periodic table of the elements, several important chemical constants, the calculation of the molecular weight, the checking for a correct CAS registry number, and the number of valence electrons.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit DStruct
DStruct

The unit DStruct contains routines, which support the implementation of commonly used data structures (FIFO registers, and bit fields).

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Vector
Vector

The unit Vector offers some of the more important operations for processing floating point vectors. It hides all stuff dealing with array addressing and memory management. Thus, the user may fully concentrate on his/her work with vectors.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit StringL
StringL

The unit StringL offers some means to process strings. A collection of procedures and functions provide several often used string formatting functions. In addition, StringL contains the class TGrep which offers a versatile string search utility using the wide spread definition of regular expressions as e.g. in the Unix command "grep".

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit CForm
CForm

The unit CForm contains a class (TMolForm) which supports the handling and display of molecular formulas.  Apart from displaying chemical formulas using the usual notation (subscripted number of atoms, superscripted isotopic labels), CForm also provides several methods supporting some calculations around chemical formulas:

calculating the molecular weight

comparison of formulas

finding formulas for a given molecular weight

scanning strings for molecular formulas

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit ColSel
ColSel

The unit ColSel contains a Delphi visual component which supports the display of the predefined system colors in a combo box.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit DirTree
DirTree

This component provides a directory tree similar to the one provided by Borland with their sample component TDirectoryOutline. Horwever, TDirTree is much more carefully designed, has less bugs and is much faster. Currently, TDirTree is limited to a maximum of 1900 directories per drive.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Fourier
Fourier

The unit FOURIER contains a visual component for FFT (Fast Fourier Transform).

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Indexer
Indexer

The unit Indexer contains a text indexing machine. The indexes may be created either by use of a thesaurus, or a list of masked keywords, or by indexing every word which is not contained in a list of stop words. Indexer supports the use of regular expressions.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Math2
Math2

The unit MATH2 offers some of the most fundamental procedures of univariate statistics (such as mean values, standard deviations, or the correlation coefficient for a series of data pairs). In addition, several more advanced mathematical methods (such as the calculation of eigenvectors and principal components, a simple clustering algorithm, and the approximation of the normal and the t-distribution) are contained in this unit. The unit MATH2 also contains a simple, yet powerful class (TCurveFit) which supports curve fitting of bivariate data.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Matrix
Matrix

The unit MATRIX offers some of the most important operations to manage and process two-dimensional real and integer matrices. The object oriented approach of the unit MATRIX hides all stuff dealing with array addressing and memory management. Thus the user may fully concentrate on his/her work.

The unit MATRIX provides two classes, TMatrix and TIntMatrix, which contain a floating point and an integer matrix, respectively. MATRIX offers solutions for the following tasks:

- creation and management of matrices

- filling of matrices

- copying matrices

- matrix arithmetics

- determination of statistical parameters about the matrix elements

- inversion of a square matrix (TMatrix only)

- sorting of elements

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Meter
Meter

The unit Meter contains a Delphi visual component which supports the display of analog meters (the good old index instruments). The component is named TMeter and comes together with this help file and a sample application.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit MatView
MatView

The unit MatView provides a class which visualizes the contents of a matrix by displaying rectangles proportional to the values of the single matrix elements. MatView is especially useful to select matrix cells, rows, or columns in a visual way.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit NumLab
NumLab

The unit NumLab contains a Delphi / C++ Builder visual component which supports the display of numeric labels. The component TNumLab comes together with this help file and a sample program (both Pascal and C++).

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit NTabed
NTabEd

The unit NTabEd contains a Delphi visual component which supports the display and editing of numeric tables. Each table consists of the data table, column and row attributes, column and row headers, and a comment line. All of these items can be manipulated either interactively or programmatically. The data table is based on the class TMatrix.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit NumIO
NumIO

The unit NumLab contains a Delphi / C++ Builder visual component which supports the input of numeric data in various formats. The component TNumIO comes together with this help file and a sample program (both Pascal and C++).

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit RChart
RChart

The unit RChart contains a Delphi visual component which supports the display of scientific graphs. The component is named TRChart and comes together with this help file and several example programs.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


Unit Rot3D
Rot3D

The unit ROT3D displays three-dimensional data and supports flickerfree rotation of the 3D view. The rotation can be achieved either by mouse interaction, or by using built-in methods of the class TRot3D. The data can be viewed from any direction, and can be zoomed and panned. Optionally, axes and/or a bounding box may be displayed.

For technical reasons, this help file is restricted to a single component or unit. If you want to have the cumulative help for all components available from SDL, you may download a free copy of the cumulative help from our web site:

http://www.lohninger.com/


 Type Ambiguities

See also:

Some of the components of SDL have type definitions which are syntactically equal to each other. For organizational reasons they are declared separately in each unit. However, this approach may result in ambigous type declarations, if two or more of these components are used within the same program. The compiler generates the following error message:

Delphi:	Incompatible Types

C++Builder:	Ambiguity between 'xxx::ttt' and 'zzz::ttt'

If such a problem occurs, the user has to explicitely specify the unit, or name space of the type declaration by using the name of the unit preceding the actual identifier. The unit name is separated by a dot (or two colons in case of C++) from the identifier.

Example:	Suppose you are using the components Meter and Numlab on the same form. Both components have defined the property FrameStyle which is of the type TFrameStyle. In order to assign a new frame style during run-time you have to explicitely specify the unit which is used for the type definition:

NumLab1.FrameStyle := Numlab.fsRaised;

Meter1.FrameStyle := Meter.fsRaised;

or the same in C++:

NumLab1->FrameStyle = Numlab::fsRaised;

Meter1->FrameStyle = Meter::fsRaised;


How to order

Back to the Contents

For registration please run the program REGISTER.EXE (which prints the registration form) and send the printed form together with the proper amount of money (preferrably credit cards or cash, for cheques please add US$ 5,-) to the following address:

   SDL

   Software Development Lohninger

   P.O.B. 123

   A-1061 Vienna

   Austria, Europe

   email: helpdesk@lohninger.com

The components are preferrably delivered by electronic means (download from our update server after authorization by email). For quick delivery (within 24 hours), please fax the order form (credit card orders, only) to the fax number indicated at our home page:

http://www.lohninger.com/

There are several additional Delphi / C++Builder components, and other software products available from SDL. Ordering several components (w/o source code) together will entitle you to a discount:

2 components	-10 %

3..5 components	-20 %

more than 5	-30 %

Special Offer 1:

SDL Component Suite: Take all of our Delphi / C++Builder (w/o sources) and pay only US$ 55.

This offer includes:

* unlimited free updates via our webserver

* free support for both the Delphi and the C++Builder versions of the components

Special Offer 2:

SLD Component Suite Pro: Purchase the sources of all of our components and get a free subscription to all future components for only US$ 399. This offer includes:

* full source code of all components

* unlimited free updates via our webserver

* free subscription to future components: your component library is thus automatically growing month by month at no extra costs

* free support for both the Delphi and the C++Builder versions of the components

For the latest release of SDL´s Delphi and C++Builder components and for pricing information see http://www.lohninger.com/ or write to the address above.


A  Personal  Remark

We are putting much effort into the production of  most reliable components and units for other programmers. Everybody  who is using our software gets our expertise at a competitive price. But this is only possible if everybody who uses our software, registers it and pays for it. So, if you don't want to kill the shareware idea, don't hesitate to support our work and register this piece of software.

Hans Lohninger of SDL

Vienna, Austria.


Installing under C++Builder - Non Visual Component
 C++Builder Installation - Non Visual Component

See also:	Delphi installation, SDL Component Suite Help

Please mind that the unit is not a visual component. Therefore, this unit cannot be installed in the C++Builder VCL.

1. Installing the component under C++ Builder 1.0

1.1	Copy the OBJ file(s) to the directory where the C++Builder library is located  (XXX/CBuilder/Lib, or XXX/CBuilder/Lib/Obj).

1.2	Copy the HPP file(s) into the include directory (XXX/CBuilder/Include)

2. Installing the package under C++Builder 3.0

2.1	Copy all HPP files to the include directory of C++Builder (XXX/CBuilder3/Include)

2.2	Copy all DFM, RES, and OBJ files to the object directory of C++Builder (XXX/CBuilder3/lib/obj)

2.3	Copy all BPL files to the binaries directory of C++Builder (XXX/CBuilder3/bin)

2.4	Copy all BPI, DCR, and LIB files to the library directory of C++Builder (XXX/CBuilder3/lib)

2.5	In the C++Builder main menu click on "Component", and then on "Install Packages". This starts the package installation window.

2.6a	If you have previously installed an earlier version of the package, select this earlier version and remove it by clicking on the "Remove" button.

2.6b	Now click on "Add" and select the package to be installed (all package names start with "sdl"). The packages can be found in the binaries directory of C++Builder (XXX/CBuilder3/bin). You may repeat step 2.6 for installing several packages

2.7	When done, click on OK. C++ Builder will then add the selected components to its package library. Note that installed component is not visible in the VCL palette.

Note:	If you are installing several or all of the SDL components, the order of installation is important because some packages require others to be already installed. Here is a sample order which works: CDATA, CFORM, STRINGL, MATH1, VECTOR, MATRIX, MATH2, NTABED, NUMLAB, RCHART, ROT3D, NUMIO, STATIS, DSTRUCT, DIRTREE, COLSEL, FOURIER, METER

2. Adding the help file to the C++Builder help system

2.1  (optional) Copy the HLP file(s) to the help directory of C++Builder

2.2  Run the OpenHelp application from the C++Builder group menu.

2.3  Click on the "Add" button, and add the help file(s) to the "Available Help Files" list

2.4  Select the help file(s) and click on ">"

2.5  Click on OK. Thereafter the C++Builder help system knows about the new component(s).

As an alternative, you could install the cumulative help file SDLSUITE.HLP which covers all components of SDL. The cumulative help is available for free at the following web site:

http://www.lohninger.com/


Installing under Delphi - non visual component
 Delphi Installation - Non Visual Component

See also:	C++ Builder installation, SDL Component Suite Help

1. Installing the unit under Delphi

Please mind that the unit is not a visual component. Therefore, this unit cannot be installed in the Delphi VCL.

1.1. Installation under Delphi, versions 1, 2, and 3

1.1 	Copy the DCU file(s) to the directory where the Delphi library is located.

1.2. Installing the components under Delphi 4

1.2.1. If not already running, start up Delphi 4.

1.2.2. If you have installed a previous (shareware) copy, uninstall it

1.2.3. Select the subdirectory delphi40 of the distribution files

1.2.4. Copy all files of this directory to the Delphi compiler directory (usually  'XYZ\Delphi 4.0\Bin')

1.2.5. Click on "Component" and then on "Install Packages ..."

1.2.6. Click on "Add.." and browse the Delphi library path for sdl*.dpl files

1.2.7. Select the package to be installed

1.2.8. Optinonally, repeat the addition of other packages

1.2.9. Click on OK. Thereafter the selected package(s) is(are) available, but not visible in the VCL palette

Note:	If you are installing several or all of the SDL components, the order of installation is important because some packages require others to be already installed. Here is a sample order which works: CDATA, CFORM, STRINGL, MATH1, VECTOR, MATRIX, MATH2, NTABED, NUMLAB, RCHART, ROT3D, NUMIO, STATIS, DSTRUCT, DIRTREE, COLSEL, FOURIER, METER

2. Merging the help keywords into the master help index

2.1  Copy the HLP and the KWF files to the directory where the master help file DELPHI.HLP is located (usually \DELPHI\BIN).

2.2  Run the HELPINST application from the Delphi group menu.

2.3  Open the master index DELPHI.HDX

2.4  Add the keyword file (.KWF)

2.5 	Save and compile the new index. Thereafter the Delphi master help index includes the keywords for the component's Help screens.

As an alternative, you could install the cumulative help file SDLSUITE.HLP into the Delphi Tools menu. This approach is far better and much more reliable than merging the help files into the master help index. The cumulative help is available for free at the following web site:

http://www.lohninger.com/

-------------------------------

Note:	Assure yourself that the PATH environment variable includes the directory where the help file is stored. Otherwise the Windows help system will not find the new help file. Alternatively, you can copy the help file to the Windows directory.


Delphi and C++Builder Issues

See also:

C++Builder users of class TVector:

Don’t mix up the class TVector with the vector class of the Rogue Wave Standard C++ Library. (Sorry for the duplicate naming).

Any component of SDL comes both for the Delphi and the C++Builder environment. Thus, you get full support both for Delphi and C++Builder with our components. The following general directory layout of the delivered zip files makes it easier to access the parts you need:

Please note, that the RES files of the sample applications are supplied both as a 16-bit and a 32-bit version (denoted by the extension RES16, and RES32). You have to rename the proper version to RES before compiling the sample applications.


Installing the SDL Component Suite Help
 Installation of the SDL Component Suite Help

See also:	C++ Builder installation, Delphi installation

If you want to install the SDL Component Suite help file into the tools menu of the Delphi or C++Builder IDE, you have to perform the folowing steps:

Delphi 1.0

1.	Click on the "Options" command in the main menu

2.	Click on "Tools..." in the submenu

3.	Click on "Add..." in the tools window

4a.	Enter a title for the help file (e.g. "SDL Help")

4b.	Browse your computer for the program "Winhelp.exe" (which is normally located in the Windows directory "c:\windows")

4c.	In the "Parameters" box, enter the full path of the help file (e.g. "d:\delphi20\compiler\help\sdl16.hlp")

4d.	Click on "OK", and then on "Close"

The cumulative help of the Delphi Componente Suite should now be available from the "Tools" menu of Delphi 1

Delphi 2.0/3.0/4.0, C++Builder 1.0/3.0

1.	Delphi 2, and 3: Click on the "Tools" command in the main menu

2a.	Delphi 2: Click on "Tools..." in the submenu

2b.	Delphi 3 & 4, C++Builder: Click on "Configure Tools..." in the submenu

3.	Click on "Add..." in the tools window

4a.	Enter a title for the help file (e.g. "SDL Help")

4b.	Browse your computer for the program "Winhlp32.exe" (which is normally located in the Windows directory "c:\windows")

4c.	In the "Parameters" box, enter the full path of the help file (e.g. "d:\delphi20\compiler\help\sdl32.hlp")

4d.	Click on "OK", and then on "Close"

The cumulative help of the Delphi Componente Suite should now be available from the "Tools" menu of the IDE.


Nag Hints in the Registered Version
 How to get rid of the nag hints in the registered versions

See also:

Question:

I recently registered this component and installed what I downloaded from the SDL update area. However, the component still lists itself to be the unregistered version.

Answer:

1) you have an old unregistered version of the component somewhere lurking on your harddisk (use the file find utility of the Windows explorer to check that). If so, remove it, deinstall the shareware copy from the VCL and install the registered version again.

2) another often experienced reason can be found in the fact that the Hint property is just set to the shareware message (from previous usage of the unregistered component). In this case, you should simply change the Hint property and/or turn the ShowHint property off.

A simple check whether the registered or the unregistered component has been linked into your program can be performed by starting the application program without running Delphi and/or C++Builder on the system. If the application uses the unregistered component, the program should overwrite the component area with a copyright message. In this case see point 1 above, otherwise point 2.


Linker error when installing RChart
I run into linker error when installing RChart

See also:	Installation of RChart

Question:

I followed the installation instructions but got a linker error when installing RChart:

[Linker Err] Undefined symbol Rcbakbmp::Register[] __fastcall referenced ....

[Linker Err] Undefined symble Rccommon::Register[] __fastcall referenced .....

What's wrong ?

Answer:

Previous versions of RChart (earlier than release 4.00) needed two additional files, RCBAKBMP and RCCOMMON, which contained some basic routines and declarations. These files are not for VCL installation. The only purpose for these files was to circumvent the 64k restrictions of Delphi 1.0. Release 4.00 and higher of RChart does no longer support Delphi 1.0 and thus does not need these files anymore.

In case you encounter this error (if you use an older version of RChart), you tried to install one of these additional files along with RCHART into the VCL. Do not install them, just copy these files to the library directory of Delphi/C++Builder.


Moving the viewing port of RChart
How to quickly move the viewing port of RChart

See also:

With charts containing a large number of graphics items, you have to be careful to avoid triggering the OnPaint event more than once. One way to get the most speed is as follows:

1) Set the property AutoRedraw to false

2) Use the method SetRange to set the coordinates of the new viewing port at once.

3) Call the method ShowGraf

As a rule of thumb on the maximum speed of changing the viewport, you should compare to the pan action if the mouse property MouseAction is set to maPan.


PCA is too slow
The calculation if the principal components is too slow

See also:	CalcPrincComp

Question:

The principal component calculation of unit Math2 is so slow if there are many variables involved.

Answer:

If the calculation of the principal components is too slow, this usually arises from a transposed data matrix with a lot of columns but only a few rows. If you face such a problem you can dramatically speed up the calculations by transposing the data matrix prior to the calculation, and exchanging loadings and scores after it. Note that this trick only works if the number of rows is considerably less than the number of columns of the data matrix.


Frequently asked questions
 Frequently Asked Questions  /  Tips and Tricks

See also:

Registered vs. shareware versions; license and update policy

I can't get rid of the nag hints after buying the registered version

Do I have to pay any royalties if I develop a commercial application using your components ?

How many licenses are required, given that several programmers of our team are using SDL's components ?

If I purchase SDL components now, do I get any updates for the next release of Delphi/C++Builder ?

I loaded the registered version from your update area, however it seems that the downloaded software is a shareware copy

Tips and tricks, common problems

How to quickly move the viewing port of RChart

The principal component analysis is so slow with many variables

What is the maximum number of points RChart can display ?

The mouse cursor does not change to its default state when moved outside RChart.

I get an "access violation error", when using TMatrix.

Installation problems

I run into linker error when installing RChart

How to get SDL help suite installed so that Delphi help recognizes it.

I cannot install unit XYZ into the Delphi/C++Builder VCL


Royalties

See also:

Question:

Do I have to pay any royalties if I develop a commercial application using your components ?

Answer:

No, definitely not. You are free to use the registered components in your commerical applications without paying any royalties to us. However, you (1) must not give away any DCU or PAS files bought from us, and (2) you must not create and deploy any similar components based on our components.


Max. Number of Data Points
Maximum number of points RChart can display ?

See also:

Question:

What is the maximum number of points RChart can display ?

Answer:

The maximum number of points is limited only by computer memory. However, the display gets slower with more points in the chart. We have tested it with up to 100000 data points.


Site Licenses

See also:

Question:

Our development team consists of five programmers. How many licenses do you require to be purchased, given that each programmer will need a copy of the component installed on their machine? Are there any discounts available in this situation?

Answer:

You need a license for each of the programmers working with our components. However we offer the following discounts

2 licenses: -10%

3..5 licenses: -20%

6..10 licenses: -30%

more than 10 licenses: please ask

Each programmer of your team will be supported by our update policy as if he/she had ordered it by their own. This includes regular updates and hotline support by email.


Installation of SDL Help
Installation of SDL Help into Delphi/C++Builder

See also:

Question:

How to get SDL help suite installed so Delphi help recognizes it.

Answer:

Help files are a still unresolved problem with Delphi. If the keyword file is getting too large, then the help system crashes. So we recommend to install the SDL help into the Tools section of the Delphi IDE. This is less convenient but it works.


Access Violation Error
Access violation errors with TMatrix and TVector

See also:	TMatrix.Create

Question:

I am having some difficulty with matrix assignments. The following code produces access violation errors:

procedure TForm1.XXX (Sender: TObject);

var

  userdata : Tmatrix;

begin

userdata.Create(5,5);

userdata.elem[1,1] := 2.332;  <--- this assignment causes the problems

....

Answer:

You made a mistake in creating the matrix. The correct statement should read like this:

...

begin

userdata := TMatrix.Create (5,5);   <--- mind the difference !

userdata.elem[1,1] := 2.332;        <--- no problems any more

...


Mouse Cursor in RChart
Mouse cursor behavior in connection with RChart

See also:	MouseAction

Question:

When the mouse cursor moves out of the RChart component fast, it retains the cursor type assigned by the component (say, cross or hand). It does not happen when the mouse is moved slowly.

Answer:

This is not a problem of RChart but of the Windows messaging system. See also hint 1 in the MouseAction page of the RChart help file.


Updates
Updates for new compiler releases

See also:

Question:

If I purchase SDL components now, do I get any updates for the next release of Delphi/C++Builder ?

Answer:

If you purchase our components, you get all upgrades for future compiler versions for free (via our update server). More information on our update policy can be found on our web site: http://www.lohninger.com/udarea.html


Installation of non-visual components

See also:

Question:

I cannot install unit XYZ into the Delphi/C++Builder VCL. I get an undefined reference in the XYZ object that goes something like this:

Undefined reference XYA::Register() in .....

Answer:

Some of the SDL units are non-visual components (for example MATH1, or MATRIX, or CDATA, ...) which cannot be installed into the VCL palette. The units are to be used in your application by simply including the unit name into the uses statement of your program (don't forget to set the library path to your unit files).


Registered and Shareware Copies
 Registered version behaves like shareware copy

See also:	shareware Hint property

Question:

I loaded the registered version from the SDL update area, however it seems that the downloaded software is a shareware copy

Answer:

You can be assured that any copy obtained from our update server is registered. The most common reason for this problem is that there are several copies of the software (some shareware, some registered) lurking somewhere on your hard disk, and the linker/procject pathes point to an unregistered copy.