ex9.pp 495 B

1234567891011121314151617181920
  1. Program Example9;
  2. Uses strings;
  3. { Program to demonstrate the StrIComp function. }
  4. Const P1 : PCHAR = 'This is a pchar string.';
  5. P2 : PCHAR = 'This is a PCHAR string.';
  6. P3 : PCHAR = 'tHiS iS aLsO a PCHAR string';
  7. Var L : Longint;
  8. begin
  9. If StrIComp (P1,P2)<>0 then writeln ('Something wrong here !');
  10. Write ('P2 and P3 match in their first ');
  11. L:=1;
  12. While StrLIComp (P2,P3,L)=0 do inc(L);
  13. Dec(L);
  14. Writeln (L,'characters, case insensitive.');
  15. end.