@@ -297,7 +297,8 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
297297 UnitIndex := NumUnits;
298298
299299 if UnitIndex > High(UnitName) then
300- Error(NumTok, TMessage.Create(TErrorCode.OutOfResources, ' Out of resources, UnitIndex: ' + IntToStr(UnitIndex)));
300+ Error(NumTok, TMessage.Create(TErrorCode.OutOfResources, ' Out of resources, UnitIndex: ' +
301+ IntToStr(UnitIndex)));
301302
302303 Line := 1 ;
303304 UnitName[UnitIndex].Name := s;
@@ -1053,8 +1054,8 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
10531054
10541055 if c in [' ' , TAB] then Inc(Spaces);
10551056
1056- if not (c in [' '' ' , ' ' , ' #' , ' ~' , ' $' , TAB, LF, CR, ' {' , (* '}',*) ' A' ..' Z' , ' _' , ' 0 ' .. ' 9 ' ,
1057- ' =' , ' .' , ' ,' , ' ;' , ' (' , ' )' , ' *' , ' /' , ' +' , ' -' , ' :' , ' >' , ' <' , ' ^' , ' @' , ' [' , ' ]' ]) then
1057+ if not (c in [' '' ' , ' ' , ' #' , ' ~' , ' $' , TAB, LF, CR, ' {' , (* '}',*) ' A' ..' Z' , ' _' ,
1058+ ' 0 ' .. ' 9 ' , ' =' , ' .' , ' ,' , ' ;' , ' (' , ' )' , ' *' , ' /' , ' +' , ' -' , ' :' , ' >' , ' <' , ' ^' , ' @' , ' [' , ' ]' ]) then
10581059 begin
10591060 // InFile.Close();
10601061 Error(NumTok, TMessage.Create(TErrorCode.UnexpectedCharacter, ' Unexpected unknown character: ' + c));
@@ -1195,6 +1196,7 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
11951196 inFile.Reset(1 );
11961197
11971198 Text := ' ' ;
1199+ ch:=' ' ;
11981200
11991201 try
12001202 while True do
@@ -1206,7 +1208,8 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
12061208
12071209 if ch in [' ' , TAB] then Inc(Spaces);
12081210
1209- until not (ch in [' ' , TAB, LF, CR, ' {' (* , '}'*) ]); // Skip space, tab, line feed, carriage return, comment braces
1211+ until not (ch in [' ' , TAB, LF, CR, ' {' (* , '}'*) ]);
1212+ // Skip space, tab, line feed, carriage return, comment braces
12101213
12111214
12121215 ch := UpCase(ch);
@@ -1317,7 +1320,8 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
13171320 StrParams := SplitStr(copy(Num, 2 , length(Num) - 2 ), ' ,' );
13181321
13191322 if High(StrParams) > MAXPARAMS then
1320- Error(NumTok, TMessage.Create(TErrorCode.TooManyFormalParameters, ' Too many formal parameters in ' + Text));
1323+ Error(NumTok, TMessage.Create(TErrorCode.TooManyFormalParameters,
1324+ ' Too many formal parameters in ' + Text));
13211325
13221326 end ;
13231327
@@ -1448,7 +1452,8 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
14481452
14491453 if ch in [' ' , TAB] then Inc(Spaces);
14501454
1451- until not (ch in [' ' , TAB, LF, CR, ' {' , ' }' ]); // Skip space, tab, line feed, carriage return, comment braces
1455+ until not (ch in [' ' , TAB, LF, CR, ' {' , ' }' ]);
1456+ // Skip space, tab, line feed, carriage return, comment braces
14521457
14531458 AsmFound := False;
14541459
@@ -1737,17 +1742,17 @@ procedure TokenizeProgram(UsesOn: Boolean = True);
17371742 end
17381743 else
17391744 begin
1740- Error(NumTok, TMessage.Create(TErrorCode.UnexpectedCharacter, ' Unexpected character '' ' +
1741- ch + ' '' found. Expected one of '' :>< .'' .' ));
1745+ Error(NumTok, TMessage.Create(TErrorCode.UnexpectedCharacter,
1746+ ' Unexpected character '' {0} '' found. Expected one of '' {1} .'' ' , ch, ' :>< .' ));
17421747 end ;
17431748 end ;
17441749 end ;
17451750
17461751
17471752 if NumTok = OldNumTok then // No token found
17481753 begin
1749- Error(NumTok, TMessage.Create(TErrorCode.UnexpectedCharacter, ' Illegal character '' ' + ch +
1750- ' '' ($' + IntToHex(Ord(ch), 2 ) + ' ) ' ));
1754+ Error(NumTok, TMessage.Create(TErrorCode.UnexpectedCharacter,
1755+ ' Illegal character '' {0} '' (${1}) found. ' , ch, IntToHex(Ord(ch), 2 )));
17511756 end ;
17521757
17531758 end ;// while
0 commit comments