Browse Source

* Patch from Ondrej Pokorny to fix camelcase (bug ID 4b46872)

git-svn-id: trunk@38619 -
michael 7 years ago
parent
commit
e46b89c8bb
3 changed files with 301 additions and 301 deletions
  1. 14 14
      rtl/inc/mathh.inc
  2. 141 141
      rtl/inc/systemh.inc
  3. 146 146
      rtl/objpas/math.pp

+ 14 - 14
rtl/inc/mathh.inc

@@ -102,26 +102,26 @@ procedure float_raise(i: TFPUExceptionMask);
   {$endif}
 {$endif}
 
-    function pi : ValReal;[internproc:fpc_in_pi_real];
-    function abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
-    function sqr(d : ValReal) : ValReal;[internproc:fpc_in_sqr_real];
-    function sqrt(d : ValReal) : ValReal;[internproc:fpc_in_sqrt_real];
-    function arctan(d : ValReal) : ValReal;[internproc:fpc_in_arctan_real];
-    function ln(d : ValReal) : ValReal;[internproc:fpc_in_ln_real];
-    function sin(d : ValReal) : ValReal;[internproc:fpc_in_sin_real];
-    function cos(d : ValReal) : ValReal;[internproc:fpc_in_cos_real];
-    function exp(d : ValReal) : ValReal;[internproc:fpc_in_exp_real];
-    function round(d : ValReal) : int64;[internproc:fpc_in_round_real];
-    function frac(d : ValReal) : ValReal;[internproc:fpc_in_frac_real];
-    function int(d : ValReal) : ValReal;[internproc:fpc_in_int_real];
-    function trunc(d : ValReal) : int64;[internproc:fpc_in_trunc_real];
+    function Pi : ValReal;[internproc:fpc_in_pi_real];
+    function Abs(d : ValReal) : ValReal;[internproc:fpc_in_abs_real];
+    function Sqr(d : ValReal) : ValReal;[internproc:fpc_in_sqr_real];
+    function Sqrt(d : ValReal) : ValReal;[internproc:fpc_in_sqrt_real];
+    function ArcTan(d : ValReal) : ValReal;[internproc:fpc_in_arctan_real];
+    function Ln(d : ValReal) : ValReal;[internproc:fpc_in_ln_real];
+    function Sin(d : ValReal) : ValReal;[internproc:fpc_in_sin_real];
+    function Cos(d : ValReal) : ValReal;[internproc:fpc_in_cos_real];
+    function Exp(d : ValReal) : ValReal;[internproc:fpc_in_exp_real];
+    function Round(d : ValReal) : int64;[internproc:fpc_in_round_real];
+    function Frac(d : ValReal) : ValReal;[internproc:fpc_in_frac_real];
+    function Int(d : ValReal) : ValReal;[internproc:fpc_in_int_real];
+    function Trunc(d : ValReal) : int64;[internproc:fpc_in_trunc_real];
 
 {$ifdef SUPPORT_EXTENDED}
     function FPower10(val: Extended; Power: Longint): Extended;
 {$endif SUPPORT_EXTENDED}
 
     type
-       real48 = array[0..5] of byte;
+       Real48 = array[0..5] of byte;
 
 {$ifdef SUPPORT_DOUBLE}
     function Real2Double(r : real48) : double;

+ 141 - 141
rtl/inc/systemh.inc

@@ -557,13 +557,13 @@ Type
 
   PNativeInt 	      = ^NativeInt;
   PNativeUInt	      = ^NativeUint;
-  pInt8   	      = PShortInt;
-  pInt16  	      = PSmallint;
-  pInt32  	      = PLongint;
+  PInt8   	      = PShortInt;
+  PInt16  	      = PSmallint;
+  PInt32  	      = PLongint;
   PIntPtr 	      = PPtrInt;
-  pUInt8  	      = PByte;
-  pUInt16 	      = PWord;
-  pUInt32 	      = PDWord;
+  PUInt8  	      = PByte;
+  PUInt16 	      = PWord;
+  PUInt32 	      = PDWord;
   PUintPtr	      = PPtrUInt;
 
   PShortString        = ^ShortString;
@@ -656,10 +656,10 @@ const
   MaxUIntValue = High(ValUInt);
 
 { max. values for longint and int}
-  maxLongint  = $7fffffff;
-  maxSmallint = 32767;
+  MaxLongint  = $7fffffff;
+  MaxSmallint = 32767;
 
-  maxint   = maxsmallint;
+  MaxInt   = maxsmallint;
 
 type
 {$ifdef CPU16}
@@ -698,8 +698,8 @@ const
 
 { Exit Procedure handling consts and types  }
   ExitProc : codepointer = nil;
-  Erroraddr: codepointer = nil;
-  Errorcode: Word    = 0;
+  ErrorAddr: codepointer = nil;
+  ErrorCode: Word    = 0;
 
 { file input modes }
   fmClosed = $D7B0;
@@ -707,7 +707,7 @@ const
   fmOutput = $D7B2;
   fmInOut  = $D7B3;
   fmAppend = $D7B4;
-  Filemode : byte = 2;
+  FileMode : byte = 2;
 (* Value should be changed during system initialization as appropriate. *)
 
   { assume that this program will not spawn other threads, when the
@@ -754,7 +754,7 @@ var
 
 {$ifndef HAS_CMDLINE}
 {Value should be changed during system initialization as appropriate.}
-var cmdline:Pchar=nil;
+var CmdLine:Pchar=nil;
 {$endif}
 
 {$ifdef FPC_HAS_FEATURE_THREADING}
@@ -822,7 +822,7 @@ function  CompareDWord(const buf1,buf2;len:SizeInt):SizeInt;
 procedure MoveChar0(const buf1;var buf2;len:SizeInt);
 function  IndexChar0(const buf;len:SizeInt;b:char):SizeInt;
 function  CompareChar0(const buf1,buf2;len:SizeInt):SizeInt;
-procedure prefetch(const mem);[internproc:fpc_in_prefetch_var];
+procedure Prefetch(const mem);[internproc:fpc_in_prefetch_var];
 procedure ReadBarrier;
 procedure ReadDependencyBarrier;
 procedure ReadWriteBarrier;
@@ -836,27 +836,27 @@ procedure MoveData(srcseg,srcoff,destseg,destoff:Word;n:Word);
                           Math Routines
 ****************************************************************************}
 
-Function  lo(B: Byte):Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
-Function  hi(b : Byte) : Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
-Function  lo(i : Integer) : byte;  [INTERNPROC: fpc_in_lo_Word];
-Function  lo(w : Word) : byte;     [INTERNPROC: fpc_in_lo_Word];
-Function  lo(l : Longint) : Word;  [INTERNPROC: fpc_in_lo_long];
-Function  lo(l : DWord) : Word;    [INTERNPROC: fpc_in_lo_long];
-Function  lo(i : Int64) : DWord;   [INTERNPROC: fpc_in_lo_qword];
-Function  lo(q : QWord) : DWord;   [INTERNPROC: fpc_in_lo_qword];
-Function  hi(i : Integer) : byte;  [INTERNPROC: fpc_in_hi_Word];
-Function  hi(w : Word) : byte;     [INTERNPROC: fpc_in_hi_Word];
-Function  hi(l : Longint) : Word;  [INTERNPROC: fpc_in_hi_long];
-Function  hi(l : DWord) : Word;    [INTERNPROC: fpc_in_hi_long];
-Function  hi(i : Int64) : DWord;   [INTERNPROC: fpc_in_hi_qword];
-Function  hi(q : QWord) : DWord;   [INTERNPROC: fpc_in_hi_qword];
-
-Function swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_word];
+Function  Lo(B: Byte):Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  Hi(b : Byte) : Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  Lo(i : Integer) : byte;  [INTERNPROC: fpc_in_lo_Word];
+Function  Lo(w : Word) : byte;     [INTERNPROC: fpc_in_lo_Word];
+Function  Lo(l : Longint) : Word;  [INTERNPROC: fpc_in_lo_long];
+Function  Lo(l : DWord) : Word;    [INTERNPROC: fpc_in_lo_long];
+Function  Lo(i : Int64) : DWord;   [INTERNPROC: fpc_in_lo_qword];
+Function  Lo(q : QWord) : DWord;   [INTERNPROC: fpc_in_lo_qword];
+Function  Hi(i : Integer) : byte;  [INTERNPROC: fpc_in_hi_Word];
+Function  Hi(w : Word) : byte;     [INTERNPROC: fpc_in_hi_Word];
+Function  Hi(l : Longint) : Word;  [INTERNPROC: fpc_in_hi_long];
+Function  Hi(l : DWord) : Word;    [INTERNPROC: fpc_in_hi_long];
+Function  Hi(i : Int64) : DWord;   [INTERNPROC: fpc_in_hi_qword];
+Function  Hi(q : QWord) : DWord;   [INTERNPROC: fpc_in_hi_qword];
+
+Function Swap (X : Word) : Word;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_word];
 Function Swap (X : Integer) : Integer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_word];
-Function swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_long];
+Function Swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_long];
 Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_long];
 Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_qword];
-Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_qword];
+Function Swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_swap_qword];
 
 Function Align (Addr : PtrUInt; Alignment : PtrUInt) : PtrUInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function Align (Addr : Pointer; Alignment : PtrUInt) : Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
@@ -873,52 +873,52 @@ Procedure Randomize;
 {$if defined(CPUINT8)}
   {$ifdef FPC_HAS_INTERNAL_ABS_SHORTINT}
   {$define FPC_SYSTEM_HAS_ABS_SHORTINT}
-  Function abs(l:shortint):shortint;[internproc:fpc_in_abs_long];
+  Function Abs(l:shortint):shortint;[internproc:fpc_in_abs_long];
   {$else FPC_SYSTEM_HAS_ABS_SHORTINT}
-  Function abs(l:shortint):shortint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
+  Function Abs(l:shortint):shortint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
   {$endif FPC_SYSTEM_HAS_ABS_SHORTINT}
 {$endif CPUINT8}
 {$if defined(CPUINT16) or defined(CPUINT8)}
   {$ifdef FPC_HAS_INTERNAL_ABS_SMALLINT}
   {$define FPC_SYSTEM_HAS_ABS_SMALLINT}
-  Function abs(l:smallint):smallint;[internproc:fpc_in_abs_long];
+  Function Abs(l:smallint):smallint;[internproc:fpc_in_abs_long];
   {$else FPC_HAS_INTERNAL_ABS_LONG}
-  Function abs(l:smallint):smallint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
+  Function Abs(l:smallint):smallint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
   {$endif FPC_HAS_INTERNAL_ABS_LONG}
 {$endif CPUINT16 or CPUINT8}
 {$ifdef FPC_HAS_INTERNAL_ABS_LONG}
 {$define FPC_SYSTEM_HAS_ABS_LONGINT}
-Function abs(l:longint):longint;[internproc:fpc_in_abs_long];
+Function Abs(l:longint):longint;[internproc:fpc_in_abs_long];
 {$else FPC_HAS_INTERNAL_ABS_LONG}
-Function abs(l:Longint):Longint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Abs(l:Longint):Longint;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif FPC_HAS_INTERNAL_ABS_LONG}
 {$ifdef FPC_HAS_INTERNAL_ABS_INT64}
 {$define FPC_SYSTEM_HAS_ABS_INT64}
-Function abs(l:Int64):Int64;[internproc:fpc_in_abs_long];
+Function Abs(l:Int64):Int64;[internproc:fpc_in_abs_long];
 {$else FPC_HAS_INTERNAL_ABS_INT64}
-Function abs(l:Int64):Int64;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Abs(l:Int64):Int64;[internconst:fpc_in_const_abs];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif FPC_HAS_INTERNAL_ABS_INT64}
 {$if defined(CPUINT8)}
-Function sqr(l:shortint):shortint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sqr(l:shortint):shortint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif CPUINT8}
 {$if defined(CPUINT16) or defined(CPUINT8)}
-Function sqr(l:smallint):smallint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sqr(l:smallint):smallint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif CPUINT16 or CPUINT8}
-Function sqr(l:Longint):Longint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function sqr(l:Int64):Int64;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function sqr(l:QWord):QWord;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sqr(l:Longint):Longint;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sqr(l:Int64):Int64;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Sqr(l:QWord):QWord;[internconst:fpc_in_const_sqr];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$if defined(CPUINT8)}
-Function odd(l:shortint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function odd(l:byte):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:shortint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:byte):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif CPUINT8}
 {$if defined(CPUINT16) or defined(CPUINT8)}
-Function odd(l:smallint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function odd(l:word):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:smallint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:word):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif CPUINT16 or CPUINT8}
-Function odd(l:Longint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function odd(l:Longword):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function odd(l:Int64):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function odd(l:QWord):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:Longint):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:Longword):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:Int64):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Odd(l:QWord):Boolean;[internconst:fpc_in_const_odd];{$ifdef SYSTEMINLINE}inline;{$endif}
 
 function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 function SwapEndian(const AValue: Word): Word;{$ifdef SYSTEMINLINE}inline;{$endif}
@@ -1161,17 +1161,17 @@ function PopCnt(Const AValue : QWord): QWord;[internproc:fpc_in_popcnt_x];
                          Addr/Pointer Handling
 ****************************************************************************}
 
-Function  ptr(sel,off:{$ifdef CPU16}Word{$else}Longint{$endif}):farpointer;[internconst:fpc_in_const_ptr];{$ifdef SYSTEMINLINE}inline;{$endif}
-Function  Cseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
-Function  Dseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
-Function  Sseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  Ptr(sel,off:{$ifdef CPU16}Word{$else}Longint{$endif}):farpointer;[internconst:fpc_in_const_ptr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  CSeg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  DSeg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  SSeg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 
 {****************************************************************************
                       PChar and String Handling
 ****************************************************************************}
 
-function strpas(p:pchar):shortstring;{$ifdef SYSTEMINLINE}inline;{$endif}
-function strlen(p:pchar):sizeint;external name 'FPC_PCHAR_LENGTH';
+function StrPas(p:pchar):shortstring;{$ifdef SYSTEMINLINE}inline;{$endif}
+function StrLen(p:pchar):sizeint;external name 'FPC_PCHAR_LENGTH';
 
 { result:
   <0: invalid sequence detected after processing "-result" bytes
@@ -1202,37 +1202,37 @@ Procedure SetString(out S : AnsiString; Buf : PWideChar; Len : SizeInt);
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 Procedure {$ifdef FPC_HAS_CPSTRING}fpc_setstring_shortstr{$else}SetString{$endif}(out S : Shortstring; Buf : PChar; Len : SizeInt); {$ifdef FPC_HAS_CPSTRING} compilerproc; {$endif FPC_HAS_CPSTRING}
 function  ShortCompareText(const S1, S2: shortstring): SizeInt;
-Function  upCase(const s:shortstring):shortstring;
-Function  lowerCase(const s:shortstring):shortstring; overload;
+Function  UpCase(const s:shortstring):shortstring;
+Function  LowerCase(const s:shortstring):shortstring; overload;
 Function  Space(b:byte):shortstring;
-Function  hexStr(Val:Longint;cnt:byte):shortstring;
+Function  HexStr(Val:Longint;cnt:byte):shortstring;
 Function  OctStr(Val:Longint;cnt:byte):shortstring;
-Function  binStr(Val:Longint;cnt:byte):shortstring;
-Function  hexStr(Val:int64;cnt:byte):shortstring;
+Function  BinStr(Val:Longint;cnt:byte):shortstring;
+Function  HexStr(Val:int64;cnt:byte):shortstring;
 Function  OctStr(Val:int64;cnt:byte):shortstring;
-Function  binStr(Val:int64;cnt:byte):shortstring;
-Function  hexStr(Val:qword;cnt:byte):shortstring;
+Function  BinStr(Val:int64;cnt:byte):shortstring;
+Function  HexStr(Val:qword;cnt:byte):shortstring;
 Function  OctStr(Val:qword;cnt:byte):shortstring;
-Function  binStr(Val:qword;cnt:byte):shortstring;
+Function  BinStr(Val:qword;cnt:byte):shortstring;
 {$ifdef CPUI8086}
-Function  hexStr(Val:NearPointer):shortstring;
-function  hexStr(Val:NearCsPointer):shortstring;
-function  hexStr(Val:NearDsPointer):shortstring;
-function  hexStr(Val:NearEsPointer):shortstring;
-function  hexStr(Val:NearSsPointer):shortstring;
-function  hexStr(Val:NearFsPointer):shortstring;
-function  hexStr(Val:NearGsPointer):shortstring;
-Function  hexStr(Val:FarPointer):shortstring;
-Function  hexStr(Val:HugePointer):shortstring;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  HexStr(Val:NearPointer):shortstring;
+function  HexStr(Val:NearCsPointer):shortstring;
+function  HexStr(Val:NearDsPointer):shortstring;
+function  HexStr(Val:NearEsPointer):shortstring;
+function  HexStr(Val:NearSsPointer):shortstring;
+function  HexStr(Val:NearFsPointer):shortstring;
+function  HexStr(Val:NearGsPointer):shortstring;
+Function  HexStr(Val:FarPointer):shortstring;
+Function  HexStr(Val:HugePointer):shortstring;{$ifdef SYSTEMINLINE}inline;{$endif}
 {$else CPUI8086}
-Function  hexStr(Val:Pointer):shortstring;
+Function  HexStr(Val:Pointer):shortstring;
 {$endif CPUI8086}
 
 { Char functions }
-Function chr(b : byte) : Char;      [INTERNPROC: fpc_in_chr_byte];
-Function  upCase(c:Char):Char;
-Function  lowerCase(c:Char):Char; overload;
-function  pos(const substr : shortstring;c:char; Offset: Sizeint = 1): SizeInt;
+Function Chr(b : byte) : Char;      [INTERNPROC: fpc_in_chr_byte];
+Function  UpCase(c:Char):Char;
+Function  LowerCase(c:Char):Char; overload;
+function  Pos(const substr : shortstring;c:char; Offset: Sizeint = 1): SizeInt;
 
 
 {****************************************************************************
@@ -1248,8 +1248,8 @@ Procedure Insert (const Source : RawByteString; var S : RawByteString; Index : S
 Procedure Delete (var S : RawByteString; Index,Size: SizeInt);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}
 {$endif VER3_0}
 Function  StringOfChar(c : Ansichar;l : SizeInt) : AnsiString;
-function  upcase(const s : ansistring) : ansistring;
-function  lowercase(const s : ansistring) : ansistring;
+function  UpCase(const s : ansistring) : ansistring;
+function  LowerCase(const s : ansistring) : ansistring;
 
 function StringCodePage(const S : RawByteString): TSystemCodePage; overload;
 function StringElementSize(const S : RawByteString): Word; overload;
@@ -1381,22 +1381,22 @@ procedure SetTextCodePage(var T: Text; CodePage: TSystemCodePage);
 ****************************************************************************}
 
 {$ifdef FPC_HAS_FEATURE_FILEIO}
-Procedure chdir(const s:shortstring); overload;
-Procedure mkdir(const s:shortstring); overload;
-Procedure rmdir(const s:shortstring); overload;
-Procedure getdir(drivenr:byte;var dir:shortstring);overload;
+Procedure ChDir(const s:shortstring); overload;
+Procedure MkDir(const s:shortstring); overload;
+Procedure RmDir(const s:shortstring); overload;
+Procedure GetDir(drivenr:byte;var dir:shortstring);overload;
 {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
-Procedure chdir(const s:rawbytestring); overload;
-Procedure mkdir(const s:rawbytestring); overload;
-Procedure rmdir(const s:rawbytestring); overload;
+Procedure ChDir(const s:rawbytestring); overload;
+Procedure MkDir(const s:rawbytestring); overload;
+Procedure RmDir(const s:rawbytestring); overload;
 // defaultrtlfilesystemcodepage is returned here
-Procedure getdir(drivenr:byte;var dir: rawbytestring);overload;{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}
+Procedure GetDir(drivenr:byte;var dir: rawbytestring);overload;{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
-Procedure chdir(const s:unicodestring); overload;
-Procedure mkdir(const s:unicodestring); overload;
-Procedure rmdir(const s:unicodestring); overload;
-Procedure getdir(drivenr:byte;var dir: unicodestring);overload;
+Procedure ChDir(const s:unicodestring); overload;
+Procedure MkDir(const s:unicodestring); overload;
+Procedure RmDir(const s:unicodestring); overload;
+Procedure GetDir(drivenr:byte;var dir: unicodestring);overload;
 {$endif FPC_HAS_FEATURE_WIDESTRINGS}
 
 {$endif FPC_HAS_FEATURE_FILEIO}
@@ -1431,7 +1431,7 @@ function get_caller_frame(framebp:pointer;addr:codepointer=nil):pointer;
 procedure get_caller_stackinfo(var framebp : pointer; var addr : codepointer);
 
 Function IOResult:Word;
-Function Sptr:Pointer;[internconst:fpc_in_const_ptr];
+Function SPtr:Pointer;[internconst:fpc_in_const_ptr];
 
 {$ifdef FPC_HAS_FEATURE_PROCESSES}
 Function GetProcessID:SizeUInt;
@@ -1445,69 +1445,69 @@ Function GetThreadID:TThreadID;{$ifdef SYSTEMINLINE}inline;{$endif}
 {$endif}
 
 {$ifdef cpu16}
-function InterLockedIncrement (var Target: smallint) : smallint; public name 'FPC_INTERLOCKEDINCREMENT16';
-function InterLockedDecrement (var Target: smallint) : smallint; public name 'FPC_INTERLOCKEDDECREMENT16';
-function InterLockedExchange (var Target: smallint;Source : smallint) : smallint; public name 'FPC_INTERLOCKEDEXCHANGE16';
-function InterLockedExchangeAdd (var Target: smallint;Source : smallint) : smallint; public name 'FPC_INTERLOCKEDEXCHANGEADD16';
+function InterlockedIncrement (var Target: smallint) : smallint; public name 'FPC_INTERLOCKEDINCREMENT16';
+function InterlockedDecrement (var Target: smallint) : smallint; public name 'FPC_INTERLOCKEDDECREMENT16';
+function InterlockedExchange (var Target: smallint;Source : smallint) : smallint; public name 'FPC_INTERLOCKEDEXCHANGE16';
+function InterlockedExchangeAdd (var Target: smallint;Source : smallint) : smallint; public name 'FPC_INTERLOCKEDEXCHANGEADD16';
 function InterlockedCompareExchange(var Target: smallint; NewValue: smallint; Comperand: smallint): smallint; public name 'FPC_INTERLOCKEDCOMPAREEXCHANGE16';
 {$endif cpu16}
-function InterLockedIncrement (var Target: longint) : longint; public name 'FPC_INTERLOCKEDINCREMENT';
-function InterLockedDecrement (var Target: longint) : longint; public name 'FPC_INTERLOCKEDDECREMENT';
-function InterLockedExchange (var Target: longint;Source : longint) : longint; public name 'FPC_INTERLOCKEDEXCHANGE';
-function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint; public name 'FPC_INTERLOCKEDEXCHANGEADD';
+function InterlockedIncrement (var Target: longint) : longint; public name 'FPC_INTERLOCKEDINCREMENT';
+function InterlockedDecrement (var Target: longint) : longint; public name 'FPC_INTERLOCKEDDECREMENT';
+function InterlockedExchange (var Target: longint;Source : longint) : longint; public name 'FPC_INTERLOCKEDEXCHANGE';
+function InterlockedExchangeAdd (var Target: longint;Source : longint) : longint; public name 'FPC_INTERLOCKEDEXCHANGEADD';
 function InterlockedCompareExchange(var Target: longint; NewValue: longint; Comperand: longint): longint; public name 'FPC_INTERLOCKEDCOMPAREEXCHANGE';
 {$ifdef cpu64}
-function InterLockedIncrement64 (var Target: int64) : int64; public name 'FPC_INTERLOCKEDINCREMENT64';
-function InterLockedDecrement64 (var Target: int64) : int64; public name 'FPC_INTERLOCKEDDECREMENT64';
-function InterLockedExchange64 (var Target: int64;Source : int64) : int64; public name 'FPC_INTERLOCKEDEXCHANGE64';
-function InterLockedExchangeAdd64 (var Target: int64;Source : int64) : int64; public name 'FPC_INTERLOCKEDEXCHANGEADD64';
+function InterlockedIncrement64 (var Target: int64) : int64; public name 'FPC_INTERLOCKEDINCREMENT64';
+function InterlockedDecrement64 (var Target: int64) : int64; public name 'FPC_INTERLOCKEDDECREMENT64';
+function InterlockedExchange64 (var Target: int64;Source : int64) : int64; public name 'FPC_INTERLOCKEDEXCHANGE64';
+function InterlockedExchangeAdd64 (var Target: int64;Source : int64) : int64; public name 'FPC_INTERLOCKEDEXCHANGEADD64';
 function InterlockedCompareExchange64(var Target: int64; NewValue: int64; Comperand: int64): int64; public name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
 {$endif cpu64}
 { Pointer overloads }
 {$if defined(FPC_HAS_EXPLICIT_INTERLOCKED_POINTER)}
 { Note: define FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER if the target platform defines
         these pointer overloads itself instead of using platform independant inline functions }
-function InterLockedIncrement (var Target: Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
-function InterLockedDecrement (var Target: Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
-function InterLockedExchange (var Target: Pointer;Source : Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
-function InterLockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
-function InterLockedCompareExchange(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer;  {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$else}public name 'FPC_INTERLOCKEDEXCHANGEPOINTER';{$endif}
+function InterlockedIncrement (var Target: Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
+function InterlockedDecrement (var Target: Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
+function InterlockedExchange (var Target: Pointer;Source : Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
+function InterlockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$endif}
+function InterlockedCompareExchange(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer;  {$ifndef FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER}inline;{$else}public name 'FPC_INTERLOCKEDEXCHANGEPOINTER';{$endif}
 { Note: in case of FPC_SYSTEM_HAS_EXPLICIT_INTERLOCKED_POINTER this is an alias for
-        InterLockedCompareExchange (this doesn't work with inline however) }
-function InterLockedCompareExchangePointer(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; {$ifndef FPC_INTERLOCKED_POINTER_INLINE}inline;{$else}external name 'FPC_INTERLOCKEDEXCHANGEPOINTER';{$endif}
+        InterlockedCompareExchange (this doesn't work with inline however) }
+function InterlockedCompareExchangePointer(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; {$ifndef FPC_INTERLOCKED_POINTER_INLINE}inline;{$else}external name 'FPC_INTERLOCKEDEXCHANGEPOINTER';{$endif}
 {$elseif defined(cpu64)}
-function InterLockedIncrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDINCREMENT64';
-function InterLockedDecrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDDECREMENT64';
-function InterLockedExchange (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGE64';
-function InterLockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
+function InterlockedIncrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDINCREMENT64';
+function InterlockedDecrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDDECREMENT64';
+function InterlockedExchange (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGE64';
+function InterlockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
 function InterlockedCompareExchange(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
 function InterlockedCompareExchangePointer(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
 {$else not FPC_HAS_EXPLICIT_INTERLOCKED_POINTER and not CPU64}
-function InterLockedIncrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDINCREMENT';
-function InterLockedDecrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDDECREMENT';
-function InterLockedExchange (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGE';
-function InterLockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGEADD';
+function InterlockedIncrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDINCREMENT';
+function InterlockedDecrement (var Target: Pointer) : Pointer; external name 'FPC_INTERLOCKEDDECREMENT';
+function InterlockedExchange (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGE';
+function InterlockedExchangeAdd (var Target: Pointer;Source : Pointer) : Pointer; external name 'FPC_INTERLOCKEDEXCHANGEADD';
 function InterlockedCompareExchange(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE';
 function InterlockedCompareExchangePointer(var Target: Pointer; NewValue: Pointer; Comperand: Pointer): Pointer; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE';
 {$endif FPC_HAS_EXPLICIT_INTERLOCKED_POINTER / CPU64}
 { unsigned overloads }
 {$ifdef cpu16}
-function InterLockedIncrement (var Target: word) : word; external name 'FPC_INTERLOCKEDINCREMENT16';
-function InterLockedDecrement (var Target: word) : word; external name 'FPC_INTERLOCKEDDECREMENT16';
-function InterLockedExchange (var Target: word;Source : word) : word; external name 'FPC_INTERLOCKEDEXCHANGE16';
-function InterLockedExchangeAdd (var Target: word;Source : word) : word; external name 'FPC_INTERLOCKEDEXCHANGEADD16';
+function InterlockedIncrement (var Target: word) : word; external name 'FPC_INTERLOCKEDINCREMENT16';
+function InterlockedDecrement (var Target: word) : word; external name 'FPC_INTERLOCKEDDECREMENT16';
+function InterlockedExchange (var Target: word;Source : word) : word; external name 'FPC_INTERLOCKEDEXCHANGE16';
+function InterlockedExchangeAdd (var Target: word;Source : word) : word; external name 'FPC_INTERLOCKEDEXCHANGEADD16';
 function InterlockedCompareExchange(var Target: word; NewValue: word; Comperand: word): word; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE16';
 {$endif cpu16}
-function InterLockedIncrement (var Target: cardinal) : cardinal; external name 'FPC_INTERLOCKEDINCREMENT';
-function InterLockedDecrement (var Target: cardinal) : cardinal; external name 'FPC_INTERLOCKEDDECREMENT';
-function InterLockedExchange (var Target: cardinal;Source : cardinal) : cardinal; external name 'FPC_INTERLOCKEDEXCHANGE';
-function InterLockedExchangeAdd (var Target: cardinal;Source : cardinal) : cardinal; external name 'FPC_INTERLOCKEDEXCHANGEADD';
+function InterlockedIncrement (var Target: cardinal) : cardinal; external name 'FPC_INTERLOCKEDINCREMENT';
+function InterlockedDecrement (var Target: cardinal) : cardinal; external name 'FPC_INTERLOCKEDDECREMENT';
+function InterlockedExchange (var Target: cardinal;Source : cardinal) : cardinal; external name 'FPC_INTERLOCKEDEXCHANGE';
+function InterlockedExchangeAdd (var Target: cardinal;Source : cardinal) : cardinal; external name 'FPC_INTERLOCKEDEXCHANGEADD';
 function InterlockedCompareExchange(var Target: cardinal; NewValue: cardinal; Comperand: cardinal): cardinal; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE';
 {$ifdef cpu64}
-function InterLockedIncrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDINCREMENT64';
-function InterLockedDecrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDDECREMENT64';
-function InterLockedExchange64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGE64';
-function InterLockedExchangeAdd64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
+function InterlockedIncrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDINCREMENT64';
+function InterlockedDecrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDDECREMENT64';
+function InterlockedExchange64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGE64';
+function InterlockedExchangeAdd64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
 function InterlockedCompareExchange64(var Target: qword; NewValue: qword; Comperand: qword): int64; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
 {$endif cpu64}
 
@@ -1546,16 +1546,16 @@ Function  ParamStr(l:Longint):string;
 Procedure Dump_Stack(var f : text;fp:pointer;addr : codepointer = nil);
 procedure Dump_Stack(var f : text;skipframes : longint);
 {$ifdef FPC_HAS_FEATURE_EXCEPTIONS}
-procedure DumpExceptionBackTrace(var f:text);
+procedure DumpExceptionBacktrace(var f:text);
 {$endif FPC_HAS_FEATURE_EXCEPTIONS}
 
 Procedure RunError(w:Word);noreturn;
 Procedure RunError;{$ifdef SYSTEMINLINE}inline;{$endif}noreturn;
-Procedure halt(errnum:Longint);noreturn;
+Procedure Halt(errnum:Longint);noreturn;
 {$ifdef FPC_HAS_FEATURE_HEAP}
 Procedure AddExitProc(Proc:TProcedure);
 {$endif FPC_HAS_FEATURE_HEAP}
-Procedure halt;{$ifdef SYSTEMINLINE}inline;{$endif}noreturn;
+Procedure Halt;{$ifdef SYSTEMINLINE}inline;{$endif}noreturn;
 
 { Need to be exported for threads unit }
 {$ifdef FPC_HAS_FEATURE_EXCEPTIONS}
@@ -1587,7 +1587,7 @@ Function StringToPPChar(S: PChar;ReserveEntries:integer):ppchar;
 
 procedure AbstractError;external name 'FPC_ABSTRACTERROR';
 procedure EmptyMethod;external name 'FPC_EMPTYMETHOD';
-Function  SysBackTraceStr(Addr:CodePointer): ShortString;
+Function  SysBacktraceStr(Addr:CodePointer): ShortString;
 Procedure SysAssert(const Msg,FName:ShortString;LineNo:Longint;ErrorAddr:Pointer);
 (* Supposed to return address of previous CtrlBreakHandler *)
 (* (may be nil), returned value of pointer (-1) means that *)
@@ -1596,7 +1596,7 @@ function SysSetCtrlBreakHandler (Handler: TCtrlBreakHandler): TCtrlBreakHandler;
 
 { Error handlers }
 Type
-  TBackTraceStrFunc = Function (Addr: CodePointer): ShortString;
+  TBacktraceStrFunc = Function (Addr: CodePointer): ShortString;
   TErrorProc = Procedure (ErrNo : Longint; Address : CodePointer; Frame : Pointer);
   TAbstractErrorProc = Procedure;
   TAssertErrorProc = Procedure(const msg,fname:ShortString;lineno:longint;erroraddr:pointer);
@@ -1604,7 +1604,7 @@ Type
 
 
 const
-  BackTraceStrFunc  : TBackTraceStrFunc = @SysBackTraceStr;
+  BacktraceStrFunc  : TBacktraceStrFunc = @SysBacktraceStr;
   ErrorProc         : TErrorProc = nil;
   AbstractErrorProc : TAbstractErrorProc = nil;
   AssertErrorProc   : TAssertErrorProc = @SysAssert;

+ 146 - 146
rtl/objpas/math.pp

@@ -97,28 +97,28 @@ Const
        { break all assembler code  PM                            }
 {$if defined(FPC_HAS_TYPE_FLOAT128)}
       type
-         float = float128;
+         Float = Float128;
 
       const
          MinFloat = MinFloat128;
          MaxFloat = MaxFloat128;
 {$elseif defined(FPC_HAS_TYPE_EXTENDED)}
       type
-         float = extended;
+         Float = extended;
 
       const
          MinFloat = MinExtended;
          MaxFloat = MaxExtended;
 {$elseif defined(FPC_HAS_TYPE_DOUBLE)}
       type
-         float = double;
+         Float = double;
 
       const
          MinFloat = MinDouble;
          MaxFloat = MaxDouble;
 {$elseif defined(FPC_HAS_TYPE_SINGLE)}
       type
-         float = single;
+         Float = single;
 
       const
          MinFloat = MinSingle;
@@ -131,7 +131,7 @@ Const
        PFloat = ^Float;
        PInteger = ObjPas.PInteger;
 
-       tpaymenttime = (ptendofperiod,ptstartofperiod);
+       TPaymentTime = (ptEndOfPeriod,ptStartOfPeriod);
 
        EInvalidArgument = class(ematherror);
 
@@ -287,15 +287,15 @@ function SimpleRoundTo(const AValue: Extended; const Digits: TRoundToRange = -2)
 
 { angle conversion }
 
-function degtorad(deg : float) : float;inline;
-function radtodeg(rad : float) : float;inline;
-function gradtorad(grad : float) : float;inline;
-function radtograd(rad : float) : float;inline;
-function degtograd(deg : float) : float;inline;
-function gradtodeg(grad : float) : float;inline;
+function DegToRad(deg : float) : float;inline;
+function RadToDeg(rad : float) : float;inline;
+function GradToRad(grad : float) : float;inline;
+function RadToGrad(rad : float) : float;inline;
+function DegToGrad(deg : float) : float;inline;
+function GradToDeg(grad : float) : float;inline;
 { one cycle are 2*Pi rad }
-function cycletorad(cycle : float) : float;inline;
-function radtocycle(rad : float) : float;inline;
+function CycleToRad(cycle : float) : float;inline;
+function RadToCycle(rad : float) : float;inline;
 {$ifdef FPC_HAS_TYPE_SINGLE}
 Function DegNormalize(deg : single) : single; inline;
 {$ENDIF}
@@ -308,70 +308,70 @@ Function DegNormalize(deg : extended) : extended; inline;
 
 { trigoniometric functions }
 
-function tan(x : float) : float;
-function cotan(x : float) : float;
-function cot(x : float) : float; inline;
+function Tan(x : float) : float;
+function Cotan(x : float) : float;
+function Cot(x : float) : float; inline;
 {$ifdef FPC_HAS_TYPE_SINGLE}
-procedure sincos(theta : single;out sinus,cosinus : single);
+procedure SinCos(theta : single;out sinus,cosinus : single);
 {$endif}
 {$ifdef FPC_HAS_TYPE_DOUBLE}
-procedure sincos(theta : double;out sinus,cosinus : double);
+procedure SinCos(theta : double;out sinus,cosinus : double);
 {$endif}
 {$ifdef FPC_HAS_TYPE_EXTENDED}
-procedure sincos(theta : extended;out sinus,cosinus : extended);
+procedure SinCos(theta : extended;out sinus,cosinus : extended);
 {$endif}
 
 
-function secant(x : float) : float; inline;
-function cosecant(x : float) : float; inline;
-function sec(x : float) : float; inline;
-function csc(x : float) : float; inline;
+function Secant(x : float) : float; inline;
+function Cosecant(x : float) : float; inline;
+function Sec(x : float) : float; inline;
+function Csc(x : float) : float; inline;
 
 { inverse functions }
 
-function arccos(x : float) : float;
-function arcsin(x : float) : float;
+function ArcCos(x : float) : float;
+function ArcSin(x : float) : float;
 
 { calculates arctan(y/x) and returns an angle in the correct quadrant }
-function arctan2(y,x : float) : float;
+function ArcTan2(y,x : float) : float;
 
 { hyperbolic functions }
 
-function cosh(x : float) : float;
-function sinh(x : float) : float;
-function tanh(x : float) : float;
+function CosH(x : float) : float;
+function SinH(x : float) : float;
+function TanH(x : float) : float;
 
 { area functions }
 
 { delphi names: }
-function arccosh(x : float) : float;inline;
-function arcsinh(x : float) : float;inline;
-function arctanh(x : float) : float;inline;
+function ArcCosH(x : float) : float;inline;
+function ArcSinH(x : float) : float;inline;
+function ArcTanH(x : float) : float;inline;
 { IMHO the function should be called as follows (FK) }
-function arcosh(x : float) : float;
-function arsinh(x : float) : float;
-function artanh(x : float) : float;
+function ArCosH(x : float) : float;
+function ArSinH(x : float) : float;
+function ArTanH(x : float) : float;
 
 { triangle functions }
 
 { returns the length of the hypotenuse of a right triangle }
 { if x and y are the other sides                           }
-function hypot(x,y : float) : float;
+function Hypot(x,y : float) : float;
 
 { logarithm functions }
 
-function log10(x : float) : float;
-function log2(x : float) : float;
-function logn(n,x : float) : float;
+function Log10(x : float) : float;
+function Log2(x : float) : float;
+function LogN(n,x : float) : float;
 
 { returns natural logarithm of x+1, accurate for x values near zero }
-function lnxp1(x : float) : float;
+function LnXP1(x : float) : float;
 
 { exponential functions }
 
-function power(base,exponent : float) : float;
+function Power(base,exponent : float) : float;
 { base^exponent }
-function intpower(base : float;const exponent : Integer) : float;
+function IntPower(base : float;const exponent : Integer) : float;
 
 operator ** (bas,expo : float) e: float; inline;
 operator ** (bas,expo : int64) i: int64; inline;
@@ -379,205 +379,205 @@ operator ** (bas,expo : int64) i: int64; inline;
 { number converting }
 
 { rounds x towards positive infinity }
-function ceil(x : float) : Integer;
-function ceil64(x: float): Int64;
+function Ceil(x : float) : Integer;
+function Ceil64(x: float): Int64;
 { rounds x towards negative infinity }
-function floor(x : float) : Integer;
-function floor64(x: float): Int64;
+function Floor(x : float) : Integer;
+function Floor64(x: float): Int64;
 
 { misc. functions }
 
 { splits x into mantissa and exponent (to base 2) }
 procedure Frexp(X: float; var Mantissa: float; var Exponent: integer);
 { returns x*(2^p) }
-function ldexp(x : float; const p : Integer) : float;
+function Ldexp(x : float; const p : Integer) : float;
 
 { statistical functions }
 
 {$ifdef FPC_HAS_TYPE_SINGLE}
-function mean(const data : array of Single) : float;
-function sum(const data : array of Single) : float;inline;
-function mean(const data : PSingle; Const N : longint) : float;
-function sum(const data : PSingle; Const N : Longint) : float;
+function Mean(const data : array of Single) : float;
+function Sum(const data : array of Single) : float;inline;
+function Mean(const data : PSingle; Const N : longint) : float;
+function Sum(const data : PSingle; Const N : Longint) : float;
 {$endif FPC_HAS_TYPE_SINGLE}
 
 {$ifdef FPC_HAS_TYPE_DOUBLE}
-function mean(const data : array of double) : float;inline;
-function sum(const data : array of double) : float;inline;
-function mean(const data : PDouble; Const N : longint) : float;
-function sum(const data : PDouble; Const N : Longint) : float;
+function Mean(const data : array of double) : float;inline;
+function Sum(const data : array of double) : float;inline;
+function Mean(const data : PDouble; Const N : longint) : float;
+function Sum(const data : PDouble; Const N : Longint) : float;
 {$endif FPC_HAS_TYPE_DOUBLE}
 
 {$ifdef FPC_HAS_TYPE_EXTENDED}
-function mean(const data : array of Extended) : float;
-function sum(const data : array of Extended) : float;inline;
-function mean(const data : PExtended; Const N : longint) : float;
-function sum(const data : PExtended; Const N : Longint) : float;
+function Mean(const data : array of Extended) : float;
+function Sum(const data : array of Extended) : float;inline;
+function Mean(const data : PExtended; Const N : longint) : float;
+function Sum(const data : PExtended; Const N : Longint) : float;
 {$endif FPC_HAS_TYPE_EXTENDED}
 
-function sumInt(const data : PInt64;Const N : longint) : Int64;
-function sumInt(const data : array of Int64) : Int64;inline;
-function mean(const data : PInt64; const N : Longint):Float;
-function mean(const data: array of Int64):Float;
-function sumInt(const data : PInteger; Const N : longint) : Int64;
-function sumInt(const data : array of Integer) : Int64;inline;
-function mean(const data : PInteger; const N : Longint):Float;
-function mean(const data: array of Integer):Float;
+function SumInt(const data : PInt64;Const N : longint) : Int64;
+function SumInt(const data : array of Int64) : Int64;inline;
+function Mean(const data : PInt64; const N : Longint):Float;
+function Mean(const data: array of Int64):Float;
+function SumInt(const data : PInteger; Const N : longint) : Int64;
+function SumInt(const data : array of Integer) : Int64;inline;
+function Mean(const data : PInteger; const N : Longint):Float;
+function Mean(const data: array of Integer):Float;
 
 
 {$ifdef FPC_HAS_TYPE_SINGLE}
-function sumofsquares(const data : array of Single) : float;inline;
-function sumofsquares(const data : PSingle; Const N : Integer) : float;
+function SumOfSquares(const data : array of Single) : float;inline;
+function SumOfSquares(const data : PSingle; Const N : Integer) : float;
 { calculates the sum and the sum of squares of data }
-procedure sumsandsquares(const data : array of Single;
+procedure SumsAndSquares(const data : array of Single;
   var sum,sumofsquares : float);inline;
-procedure sumsandsquares(const data : PSingle; Const N : Integer;
+procedure SumsAndSquares(const data : PSingle; Const N : Integer;
   var sum,sumofsquares : float);
 {$endif FPC_HAS_TYPE_SINGLE}
 
 {$ifdef FPC_HAS_TYPE_DOUBLE}
-function sumofsquares(const data : array of double) : float;
-function sumofsquares(const data : PDouble; Const N : Integer) : float;
+function SumOfSquares(const data : array of double) : float;
+function SumOfSquares(const data : PDouble; Const N : Integer) : float;
 { calculates the sum and the sum of squares of data }
-procedure sumsandsquares(const data : array of Double;
+procedure SumsAndSquares(const data : array of Double;
   var sum,sumofsquares : float);inline;
-procedure sumsandsquares(const data : PDouble; Const N : Integer;
+procedure SumsAndSquares(const data : PDouble; Const N : Integer;
   var sum,sumofsquares : float);
 {$endif FPC_HAS_TYPE_DOUBLE}
 
 {$ifdef FPC_HAS_TYPE_EXTENDED}
-function sumofsquares(const data : array of Extended) : float;inline;
-function sumofsquares(const data : PExtended; Const N : Integer) : float;
+function SumOfSquares(const data : array of Extended) : float;inline;
+function SumOfSquares(const data : PExtended; Const N : Integer) : float;
 { calculates the sum and the sum of squares of data }
-procedure sumsandsquares(const data : array of Extended;
+procedure SumsAndSquares(const data : array of Extended;
   var sum,sumofsquares : float);inline;
-procedure sumsandsquares(const data : PExtended; Const N : Integer;
+procedure SumsAndSquares(const data : PExtended; Const N : Integer;
   var sum,sumofsquares : float);
 {$endif FPC_HAS_TYPE_EXTENDED}
 
 {$ifdef FPC_HAS_TYPE_SINGLE}
-function minvalue(const data : array of Single) : Single;inline;
-function minvalue(const data : PSingle; Const N : Integer) : Single;
-function maxvalue(const data : array of Single) : Single;inline;
-function maxvalue(const data : PSingle; Const N : Integer) : Single;
+function MinValue(const data : array of Single) : Single;inline;
+function MinValue(const data : PSingle; Const N : Integer) : Single;
+function MaxValue(const data : array of Single) : Single;inline;
+function MaxValue(const data : PSingle; Const N : Integer) : Single;
 {$endif FPC_HAS_TYPE_SINGLE}
 
 {$ifdef FPC_HAS_TYPE_DOUBLE}
-function minvalue(const data : array of Double) : Double;inline;
-function minvalue(const data : PDouble; Const N : Integer) : Double;
-function maxvalue(const data : array of Double) : Double;inline;
-function maxvalue(const data : PDouble; Const N : Integer) : Double;
+function MinValue(const data : array of Double) : Double;inline;
+function MinValue(const data : PDouble; Const N : Integer) : Double;
+function MaxValue(const data : array of Double) : Double;inline;
+function MaxValue(const data : PDouble; Const N : Integer) : Double;
 {$endif FPC_HAS_TYPE_DOUBLE}
 
 {$ifdef FPC_HAS_TYPE_EXTENDED}
-function minvalue(const data : array of Extended) : Extended;inline;
-function minvalue(const data : PExtended; Const N : Integer) : Extended;
-function maxvalue(const data : array of Extended) : Extended;inline;
-function maxvalue(const data : PExtended; Const N : Integer) : Extended;
+function MinValue(const data : array of Extended) : Extended;inline;
+function MinValue(const data : PExtended; Const N : Integer) : Extended;
+function MaxValue(const data : array of Extended) : Extended;inline;
+function MaxValue(const data : PExtended; Const N : Integer) : Extended;
 {$endif FPC_HAS_TYPE_EXTENDED}
 
-function minvalue(const data : array of integer) : Integer;inline;
+function MinValue(const data : array of integer) : Integer;inline;
 function MinValue(const Data : PInteger; Const N : Integer): Integer;
 
-function maxvalue(const data : array of integer) : Integer;inline;
-function maxvalue(const data : PInteger; Const N : Integer) : Integer;
+function MaxValue(const data : array of integer) : Integer;inline;
+function MaxValue(const data : PInteger; Const N : Integer) : Integer;
 
 { returns random values with gaussian distribution }
-function randg(mean,stddev : float) : float;
+function RandG(mean,stddev : float) : float;
 function RandomRange(const aFrom, aTo: Integer): Integer;
 function RandomRange(const aFrom, aTo: Int64): Int64;
 
 {$ifdef FPC_HAS_TYPE_SINGLE}
 { calculates the standard deviation }
-function stddev(const data : array of Single) : float;inline;
-function stddev(const data : PSingle; Const N : Integer) : float;
+function StdDev(const data : array of Single) : float;inline;
+function StdDev(const data : PSingle; Const N : Integer) : float;
 { calculates the mean and stddev }
-procedure meanandstddev(const data : array of Single;
+procedure MeanAndStdDev(const data : array of Single;
   var mean,stddev : float);inline;
-procedure meanandstddev(const data : PSingle;
+procedure MeanAndStdDev(const data : PSingle;
   Const N : Longint;var mean,stddev : float);
-function variance(const data : array of Single) : float;inline;
-function totalvariance(const data : array of Single) : float;inline;
-function variance(const data : PSingle; Const N : Integer) : float;
-function totalvariance(const data : PSingle; Const N : Integer) : float;
+function Variance(const data : array of Single) : float;inline;
+function TotalVariance(const data : array of Single) : float;inline;
+function Variance(const data : PSingle; Const N : Integer) : float;
+function TotalVariance(const data : PSingle; Const N : Integer) : float;
 
 { Population (aka uncorrected) variance and standard deviation }
-function popnstddev(const data : array of Single) : float;inline;
-function popnstddev(const data : PSingle; Const N : Integer) : float;
-function popnvariance(const data : PSingle; Const N : Integer) : float;
-function popnvariance(const data : array of Single) : float;inline;
-procedure momentskewkurtosis(const data : array of Single;
+function PopnStdDev(const data : array of Single) : float;inline;
+function PopnStdDev(const data : PSingle; Const N : Integer) : float;
+function PopnVariance(const data : PSingle; Const N : Integer) : float;
+function PopnVariance(const data : array of Single) : float;inline;
+procedure MomentSkewKurtosis(const data : array of Single;
   out m1,m2,m3,m4,skew,kurtosis : float);inline;
-procedure momentskewkurtosis(const data : PSingle; Const N : Integer;
+procedure MomentSkewKurtosis(const data : PSingle; Const N : Integer;
   out m1,m2,m3,m4,skew,kurtosis : float);
 
 { geometrical function }
 
 { returns the euclidean L2 norm }
-function norm(const data : array of Single) : float;inline;
-function norm(const data : PSingle; Const N : Integer) : float;
+function Norm(const data : array of Single) : float;inline;
+function Norm(const data : PSingle; Const N : Integer) : float;
 {$endif FPC_HAS_TYPE_SINGLE}
 
 {$ifdef FPC_HAS_TYPE_DOUBLE}
 { calculates the standard deviation }
-function stddev(const data : array of Double) : float;inline;
-function stddev(const data : PDouble; Const N : Integer) : float;
+function StdDev(const data : array of Double) : float;inline;
+function StdDev(const data : PDouble; Const N : Integer) : float;
 { calculates the mean and stddev }
-procedure meanandstddev(const data : array of Double;
+procedure MeanAndStdDev(const data : array of Double;
   var mean,stddev : float);inline;
-procedure meanandstddev(const data : PDouble;
+procedure MeanAndStdDev(const data : PDouble;
   Const N : Longint;var mean,stddev : float);
-function variance(const data : array of Double) : float;inline;
-function totalvariance(const data : array of Double) : float;inline;
-function variance(const data : PDouble; Const N : Integer) : float;
-function totalvariance(const data : PDouble; Const N : Integer) : float;
+function Variance(const data : array of Double) : float;inline;
+function TotalVariance(const data : array of Double) : float;inline;
+function Variance(const data : PDouble; Const N : Integer) : float;
+function TotalVariance(const data : PDouble; Const N : Integer) : float;
 
 { Population (aka uncorrected) variance and standard deviation }
-function popnstddev(const data : array of Double) : float;inline;
-function popnstddev(const data : PDouble; Const N : Integer) : float;
-function popnvariance(const data : PDouble; Const N : Integer) : float;
-function popnvariance(const data : array of Double) : float;inline;
-procedure momentskewkurtosis(const data : array of Double;
+function PopnStdDev(const data : array of Double) : float;inline;
+function PopnStdDev(const data : PDouble; Const N : Integer) : float;
+function PopnVariance(const data : PDouble; Const N : Integer) : float;
+function PopnVariance(const data : array of Double) : float;inline;
+procedure MomentSkewKurtosis(const data : array of Double;
   out m1,m2,m3,m4,skew,kurtosis : float);inline;
-procedure momentskewkurtosis(const data : PDouble; Const N : Integer;
+procedure MomentSkewKurtosis(const data : PDouble; Const N : Integer;
   out m1,m2,m3,m4,skew,kurtosis : float);
 
 { geometrical function }
 
 { returns the euclidean L2 norm }
-function norm(const data : array of double) : float;inline;
-function norm(const data : PDouble; Const N : Integer) : float;
+function Norm(const data : array of double) : float;inline;
+function Norm(const data : PDouble; Const N : Integer) : float;
 {$endif FPC_HAS_TYPE_DOUBLE}
 
 {$ifdef FPC_HAS_TYPE_EXTENDED}
 { calculates the standard deviation }
-function stddev(const data : array of Extended) : float;inline;
-function stddev(const data : PExtended; Const N : Integer) : float;
+function StdDev(const data : array of Extended) : float;inline;
+function StdDev(const data : PExtended; Const N : Integer) : float;
 { calculates the mean and stddev }
-procedure meanandstddev(const data : array of Extended;
+procedure MeanAndStdDev(const data : array of Extended;
   var mean,stddev : float);inline;
-procedure meanandstddev(const data : PExtended;
+procedure MeanAndStdDev(const data : PExtended;
   Const N : Longint;var mean,stddev : float);
-function variance(const data : array of Extended) : float;inline;
-function totalvariance(const data : array of Extended) : float;inline;
-function variance(const data : PExtended; Const N : Integer) : float;
-function totalvariance(const data : PExtended; Const N : Integer) : float;
+function Variance(const data : array of Extended) : float;inline;
+function TotalVariance(const data : array of Extended) : float;inline;
+function Variance(const data : PExtended; Const N : Integer) : float;
+function TotalVariance(const data : PExtended; Const N : Integer) : float;
 
 { Population (aka uncorrected) variance and standard deviation }
-function popnstddev(const data : array of Extended) : float;inline;
-function popnstddev(const data : PExtended; Const N : Integer) : float;
-function popnvariance(const data : PExtended; Const N : Integer) : float;
-function popnvariance(const data : array of Extended) : float;inline;
-procedure momentskewkurtosis(const data : array of Extended;
+function PopnStdDev(const data : array of Extended) : float;inline;
+function PopnStdDev(const data : PExtended; Const N : Integer) : float;
+function PopnVariance(const data : PExtended; Const N : Integer) : float;
+function PopnVariance(const data : array of Extended) : float;inline;
+procedure MomentSkewKurtosis(const data : array of Extended;
   out m1,m2,m3,m4,skew,kurtosis : float);inline;
-procedure momentskewkurtosis(const data : PExtended; Const N : Integer;
+procedure MomentSkewKurtosis(const data : PExtended; Const N : Integer;
   out m1,m2,m3,m4,skew,kurtosis : float);
 
 { geometrical function }
 
 { returns the euclidean L2 norm }
-function norm(const data : array of Extended) : float;inline;
-function norm(const data : PExtended; Const N : Integer) : float;
+function Norm(const data : array of Extended) : float;inline;
+function Norm(const data : PExtended; Const N : Integer) : float;
 {$endif FPC_HAS_TYPE_EXTENDED}
 
 { Financial functions }
@@ -599,9 +599,9 @@ function PresentValue(ARate: Float; NPeriods: Integer;
 
 { Misc functions }
 
-function ifthen(val:boolean;const iftrue:integer; const iffalse:integer= 0) :integer; inline; overload;
-function ifthen(val:boolean;const iftrue:int64  ; const iffalse:int64 = 0)  :int64;   inline; overload;
-function ifthen(val:boolean;const iftrue:double ; const iffalse:double =0.0):double;  inline; overload;
+function IfThen(val:boolean;const iftrue:integer; const iffalse:integer= 0) :integer; inline; overload;
+function IfThen(val:boolean;const iftrue:int64  ; const iffalse:int64 = 0)  :int64;   inline; overload;
+function IfThen(val:boolean;const iftrue:double ; const iffalse:double =0.0):double;  inline; overload;
 
 function CompareValue ( const A, B  : Integer) : TValueRelationship; inline;
 function CompareValue ( const A, B  : Int64) : TValueRelationship; inline;