ex50.pp 538 B

1234567891011121314151617181920212223242526272829
  1. Program Example49;
  2. { This program demonstrates the AnsiCompareText function }
  3. {$H+}
  4. Uses sysutils;
  5. Procedure TestIt (S1,S2 : String);
  6. Var R : Longint;
  7. begin
  8. R:=AnsiCompareText(S1,S2);
  9. Write ('"',S1,'" is ');
  10. If R<0 then
  11. write ('less than ')
  12. else If R=0 then
  13. Write ('equal to ')
  14. else
  15. Write ('larger than ');
  16. Writeln ('"',S2,'"');
  17. end;
  18. Begin
  19. Testit('One string','One smaller string');
  20. Testit('One string','one string');
  21. Testit('One string','One string');
  22. Testit('One string','One tall string');
  23. End.