fpc/tests/webtbs/tw28667.pp
Jonas Maebe 001417bb47 + test from mantis #28667
git-svn-id: trunk@33103 -
2016-02-18 21:58:34 +00:00

31 lines
464 B
ObjectPascal

{%CPU=i386}
{%OPT=-O2 -Cg}
{$mode delphi}
program a;
type
TChars=set of AnsiChar;
function get_char(var buf;var ofs:integer;const max:integer;const st:TChars):AnsiChar;
var
rbuf:array[0..0] of AnsiChar absolute buf;
begin
result:=#$20;
while (ofs<max) and (rbuf[ofs] in st) do
begin
Result:=rbuf[ofs];
inc(ofs);
break;
end;
end;
var
ofs:integer;
buf:array[0..100] of ansichar;
begin
ofs:=0;
get_char(buf,ofs,100,['=','*'])
end.