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 / tw4080.pp
Size: Mime:
program tw4080;
{$i+}

{$ifdef unix}
uses
  cwstring;
{$endif unix}

var
  S, S2 : array [1..15] of char;
  f: text;
  f2: file;
  l: longint;
  str: shortstring;
  astr: ansistring;
  wstr: widestring;
begin
  S := 'string1'#0'string2';
  assign(f,'tw4080.out');
  rewrite(f);
  write (f,S);
  close(f);
  assign(f2,'tw4080.out');
  reset(f2,1);
  if (filesize(f2) <> 15) then
    halt(1);
  blockread(f2,s2,sizeof(s2));
  close(f2);
  erase(f2);
  for l := low(s) to high(s) do
    if s[l] <> s2[l] then
      halt(1);

  str := s;
  for l := low(s) to high(s) do
    if s[l] <> str[l] then
      halt(1);

  astr := s;
  for l := low(s) to high(s) do
    if s[l] <> astr[l] then
      halt(1);
  wstr := s;
  for l := low(s) to high(s) do
    if s[l] <> wstr[l] then
      halt(1);
end.