diff --git a/fcl/inc/classes.inc b/fcl/inc/classes.inc index a15e4b0af2..d24296dffb 100644 --- a/fcl/inc/classes.inc +++ b/fcl/inc/classes.inc @@ -32,14 +32,6 @@ { Utility routines } {$i util.inc} -{!!!TSE 21.09.1998 reimplements exceptions classes} -{$IFNDEF USE_EXCEPTIONS} -constructor Exception.Create(Msg : String); -begin - inherited Create; -end; -{$ENDIF} - { TBits implementation } {$i bits.inc} @@ -370,7 +362,12 @@ end; { $Log$ - Revision 1.6 1998-10-29 12:47:14 michael + Revision 1.7 1998-10-30 14:52:48 michael + + Added format in interface + + Some errors in parser fixed, it uses exceptions now + + Strings now has no more syntax errors. + + Revision 1.6 1998/10/29 12:47:14 michael + Implementation of tpoint by WYB Revision 1.5 1998/09/23 08:41:55 michael @@ -415,7 +412,12 @@ end; { $Log$ - Revision 1.6 1998-10-29 12:47:14 michael + Revision 1.7 1998-10-30 14:52:48 michael + + Added format in interface + + Some errors in parser fixed, it uses exceptions now + + Strings now has no more syntax errors. + + Revision 1.6 1998/10/29 12:47:14 michael + Implementation of tpoint by WYB Revision 1.5 1998/09/23 08:41:55 michael @@ -433,4 +435,4 @@ end; Revision 1.1 1998/05/04 12:16:01 florian + Initial revisions after making a new directory structure -} \ No newline at end of file +} diff --git a/fcl/inc/classesh.inc b/fcl/inc/classesh.inc index ecfe0e65f2..e75625e754 100644 --- a/fcl/inc/classesh.inc +++ b/fcl/inc/classesh.inc @@ -776,9 +776,7 @@ type procedure CheckToken(T: Char); procedure CheckTokenSymbol(const S: string); procedure Error(const Ident: string); - {!!!!!! procedure ErrorFmt(const Ident: string; const Args: array of const); - } procedure ErrorStr(const Message: string); procedure HexToBinary(Stream: TStream); function NextToken: Char; @@ -1051,7 +1049,12 @@ function LineStart(Buffer, BufPos: PChar): PChar; { $Log$ - Revision 1.9 1998-10-24 13:45:35 michael + Revision 1.10 1998-10-30 14:52:49 michael + + Added format in interface + + Some errors in parser fixed, it uses exceptions now + + Strings now has no more syntax errors. + + Revision 1.9 1998/10/24 13:45:35 michael + Implemented stringlist. Untested, since classes broken. Revision 1.8 1998/09/23 07:47:41 michael @@ -1078,4 +1081,4 @@ function LineStart(Buffer, BufPos: PChar): PChar; Revision 1.1 1998/05/04 12:16:01 florian + Initial revisions after making a new directory structure -} \ No newline at end of file +} diff --git a/fcl/inc/parser.inc b/fcl/inc/parser.inc index cc62cc50e0..cf617cbcb9 100644 --- a/fcl/inc/parser.inc +++ b/fcl/inc/parser.inc @@ -122,18 +122,15 @@ begin toInteger, toFloat: Error(SNumberExpected); else -// ErrorFmt(SCharExpected, [T]); - ErrorStr('"' + T + '"' + SCharExpected); + ErrorFmt(SCharExpected, [T]); end; end; end; procedure TParser.CheckTokenSymbol(const S: string); begin - if not TokenSymbolIs(S) then begin - // ErrorFmt(SSymbolExpected, [S]); - ErrorStr(S + SSymbolExpected); - end; + if not TokenSymbolIs(S) then + ErrorFmt(SSymbolExpected, [S]); end; Procedure TParser.Error(const Ident: string); @@ -141,17 +138,14 @@ begin ErrorStr(Ident); end; -{!!!!!! Procedure TParser.ErrorFmt(const Ident: string; const Args: array of const); begin ErrorStr(Format(Ident, Args)); end; -!!!!!!} Procedure TParser.ErrorStr(const Message: string); begin -// raise EParserError.CreateFmt(SParseError, [Message, FSourceLine]); - raise EParserError.Create(Message + SParseError + IntToStr(FSourceLine)); + raise EParserError.CreateFmt(SParseError, [Message, FSourceLine]); end; @@ -322,7 +316,12 @@ begin end; { $Log$ - Revision 1.3 1998-10-02 22:41:28 michael + Revision 1.4 1998-10-30 14:52:51 michael + + Added format in interface + + Some errors in parser fixed, it uses exceptions now + + Strings now has no more syntax errors. + + Revision 1.3 1998/10/02 22:41:28 michael + Added exceptions for error handling Revision 1.2 1998/09/23 07:48:11 michael diff --git a/fcl/inc/strings.inc b/fcl/inc/strings.inc index 5e330f9a10..58a89f1b5d 100644 --- a/fcl/inc/strings.inc +++ b/fcl/inc/strings.inc @@ -562,9 +562,9 @@ Var Extra : Longint; begin If FCapacity>64 then - Extra:=FCapacity Div 4; + Extra:=FCapacity Div 4 Else If FCapacity>8 Then - Extra:=16; + Extra:=16 Else Extra:=4; SetCapacity(FCapacity+Extra); @@ -574,7 +574,7 @@ end; Procedure TStringList.QuickSort(L, R: Integer); -Var L,R,I,J : Longint; +Var I,J : Longint; Pivot : String; begin @@ -603,10 +603,10 @@ Procedure TStringList.InsertItem(Index: Integer; const S: string); begin Changing; - If FCount:=Fcapacity then Grow; + If FCount=Fcapacity then Grow; If IndexFCount) then - Error (SListIndexError,Index); + Error (SListIndexError,Index) else InsertItem (Index,S); end; - Procedure TStringList.Sort; begin If Not Sorted and FCount>1 then begin - Changing + Changing; QuickSOrt(0,FCount-1); Changed; end; @@ -902,7 +899,12 @@ end; { $Log$ - Revision 1.4 1998-10-24 13:45:37 michael + Revision 1.5 1998-10-30 14:52:52 michael + + Added format in interface + + Some errors in parser fixed, it uses exceptions now + + Strings now has no more syntax errors. + + Revision 1.4 1998/10/24 13:45:37 michael + Implemented stringlist. Untested, since classes broken. Revision 1.3 1998/05/07 14:16:51 michael