mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 18:47:56 +02:00

handling code (g_exception_reason_load() now automatically allocates the cpu register that it loads). This fixes the bug reported in http://lists.freepascal.org/lists/fpc-devel/2009-May/016773.html on i386 with -O2) git-svn-id: trunk@13105 -
54 lines
701 B
ObjectPascal
54 lines
701 B
ObjectPascal
program testwhile;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
function lineHtml( sa : string):string;
|
|
var
|
|
xPoz : integer;
|
|
xp,xk : integer;
|
|
|
|
function nextToken(var aPocz: integer;var aKon :integer):string;
|
|
|
|
begin
|
|
result:='';
|
|
aPocz:=xPoz+1;
|
|
aKon:=0;
|
|
try
|
|
while xpoz< length(sa) do begin
|
|
inc(xpoz);
|
|
case sa[xpoz] of
|
|
|
|
'|' :begin
|
|
exit;
|
|
end;
|
|
else
|
|
|
|
end;
|
|
result:=result+sa[xpoz];
|
|
inc(aKon);
|
|
|
|
end;
|
|
finally
|
|
writeln('test ',result);
|
|
aKon:=aPocz+aKon;
|
|
// writeln('test2 ',result);
|
|
end;
|
|
end;
|
|
|
|
|
|
begin
|
|
xpoz:=0;
|
|
result:='';
|
|
repeat
|
|
nextToken(xp,xk);
|
|
until xpoz>=length(sa);
|
|
end;
|
|
|
|
|
|
begin
|
|
writeln(lineHTML('| 1 | 2 | 3'));
|
|
end.
|
|
|