home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / mprocs / typesyms.icn < prev    next >
Text File  |  2000-07-29  |  2KB  |  72 lines

  1. ############################################################################
  2. #
  3. #    File:     typesyms.icn
  4. #
  5. #    Subject:  Procedure to map type codes to event codes
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     June 8, 1994
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  typesyms() returns a table that maps type codes to event codes.  The
  18. #  table can be subscripted either by one-character strings in the style
  19. #  of typecode() or by the integer values given by T_type globals.
  20. #
  21. #  This procedure is intended for use with event monitors running under
  22. #  MT Icon.
  23. #
  24. ############################################################################
  25. #
  26. #  See also: typecode.icn
  27. #
  28. ############################################################################
  29. #
  30. #  Includes:  evdefs.icn
  31. #
  32. ############################################################################
  33.  
  34. $include "evdefs.icn"
  35.  
  36. procedure typesyms()
  37.    static typetable
  38.  
  39.    initial {
  40.       typetable := table()
  41.  
  42.       typetable["L"] := E_List
  43.       typetable["S"] := E_Set
  44.       typetable["T"] := E_Table
  45.       typetable["R"] := E_Record
  46.       typetable["s"] := E_String
  47.       typetable["c"] := E_Cset
  48.       typetable["i"] := E_Integer
  49.       typetable["r"] := E_Real
  50.       typetable["f"] := E_File
  51.       typetable["n"] := E_Null
  52.       typetable["p"] := E_Proc
  53.       typetable["C"] := E_Coexpr
  54.  
  55.       typetable[T_List] := E_List
  56.       typetable[T_Set] := E_Set
  57.       typetable[T_Table] := E_Table
  58.       typetable[T_Record] := E_Record
  59.       typetable[T_String] := E_String
  60.       typetable[T_Cset] := E_Cset
  61.       typetable[T_Integer] := E_Integer
  62.       typetable[T_Real] := E_Real
  63.       typetable[T_File] := E_File
  64.       typetable[T_Null] := E_Null
  65.       typetable[T_Proc] := E_Proc
  66.       typetable[T_Coexpr] := E_Coexpr
  67.       }
  68.  
  69.    return typetable
  70.  
  71. end
  72.