Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / webtbs / tw22613.pp
Size: Mime:
{$inline on}

function leftstr(const s: string; l: integer): ansistring; inline;
var
  i: longint;
begin
  i:=1;
  while i<length(s) do
    begin
      if s[i]=' ' then
        exit(copy(s,1,i-1));
      inc(i);
    end;
  leftstr:=s;
end;

var
  Line: String;
begin
  Line := 'astring2     ';
  case LeftStr(Line,1) of
    'astring1':
      halt(1);
    'astring2': // comment this line and everything works
       halt(0);
     else
       halt(2);
  end;
end.