CHARINFO.DEF 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. FOREIGN DEFINITION MODULE CharInfo;
  2. IMPORT IMPLEMENTATION FROM "charinfo.obj";
  3. (* Proposed BSI/ISO Standard Modula-2 I/O Library
  4. * Copyright Roger Henry, University of Nottingham
  5. * Version WG/4.01, February 1989
  6. * This version editted by kjg to conform to D103, September 1989.
  7. * Permission is given to copy this Definition Module, with the
  8. * copyright notice intact, for the purposes of evaluation and test.
  9. * At the stage of a formal draft standard, Copyright will be transferred
  10. * to BSI (and through BSI to other recognised standards bodies).
  11. * Status: for review by BSI/IST/5/13;
  12. for review by ISO/IEC JTC1/SC22/WG13
  13. *)
  14. (*
  15. Purpose: Provide information about values of the type CHAR
  16. *)
  17. PROCEDURE IsEOL(ch: CHAR): BOOLEAN;
  18. (* post: returned value is true iff "ch" is the implementation-defined *)
  19. (* character used to represent end of line internally *)
  20. PROCEDURE IsDigit(ch: CHAR): BOOLEAN;
  21. (* post: returned value is true iff "ch" is a decimal digit *)
  22. PROCEDURE IsSpace(ch: CHAR): BOOLEAN;
  23. (* post: returned value is true iff "ch" is a whitespace character *)
  24. PROCEDURE IsSign(ch: CHAR): BOOLEAN;
  25. (* post: returned value is true iff "ch" is + or - sign *)
  26. PROCEDURE IsLetter(ch: CHAR): BOOLEAN;
  27. (* post: returned value is true iff "ch" is a letter *)
  28. PROCEDURE IsUpper(ch: CHAR): BOOLEAN;
  29. (* post: returned value is true iff "ch" is an upper case letter *)
  30. PROCEDURE IsLower(ch: CHAR): BOOLEAN;
  31. (* post: returned value is true iff "ch" is a lower case letter *)
  32. PROCEDURE IsControl(ch : CHAR): BOOLEAN;
  33. (* post: returns true iff "ch" is a control character (including EOL) *)
  34. PROCEDURE EOL(): CHAR;
  35. (* post: returned value is the implementation-defined character *)
  36. (* used to represent end of line internally *)
  37. END CharInfo.