fpc/tests/tbs/tb0560.pp
Jonas Maebe c1e327c8c4 * insert register allocation/deallocation information for the exception
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 -
2009-05-06 19:11:54 +00:00

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.