home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / cug / softt-3.lbr / LOOKUP.DQC / LOOKUP.DOC
Text File  |  1984-07-05  |  2KB  |  93 lines

  1. .de hd  
  2. .bp 1   
  3. .in 0   
  4. .he '$1 (2)'$2'$1 (2)'  
  5. .fo ''-#-'' 
  6. .fi 
  7. .in 7   
  8. .ti -7  
  9. NAME
  10. .br 
  11. $1 -
  12. .en 
  13. .de sy  
  14. .sp 1   
  15. .ti -7  
  16. SYNOPSIS
  17. .br 
  18. .nf 
  19. .en 
  20. .de fs  
  21. .fi 
  22. .sp
  23. .ti -7
  24. DESCRIPTION 
  25. .br 
  26. .en 
  27. .de im  
  28. .sp 
  29. .ti -7  
  30. IMPLEMENTATION  
  31. .br 
  32. .en 
  33. .de sa  
  34. .sp 
  35. .ti -7  
  36. SEE ALSO
  37. .br 
  38. .en 
  39. .de am  
  40. .sp 
  41. .ti -7  
  42. ARGUMENTS MODIFIED  
  43. .br 
  44. .en 
  45. .de ca  
  46. .sp 
  47. .ti -7  
  48. CALLS   
  49. .br 
  50. .en 
  51. .de bu  
  52. .sp 
  53. .ti -7  
  54. BUGS
  55. .br 
  56. .en 
  57. .hd LOOKUP 03/23/80 
  58. retrieve information from a symbol table
  59. .sy 
  60. integer function lookup (symbol, info, table)   
  61. character symbol (ARB)  
  62. integer info (ARB)  
  63. pointer table   
  64. .fs 
  65. 'Lookup' examines the symbol table given as its third argument for the  
  66. presence of the character-string symbol given as its first argument.
  67. If the symbol is not present, 'lookup' returns 'NO'.
  68. If the symbol is present, the information associated with it is copied  
  69. into the information array passed as the second argument to 'lookup',   
  70. and 'lookup' returns 'YES'. 
  71. .sp 
  72. The symbol table used must have been created by the routine 'mktabl'.   
  73. The size of the information array must be at least as great as the  
  74. symbol table node size, specified at its creation.  
  75. .sp 
  76. Note that all symbol table routines use dynamic storage space, which
  77. must have been previously initialized by a call to 'dsinit'.
  78. .im 
  79. 'Lookup' calls 'stlu' to determine the location of the symbol in the
  80. table.  
  81. If 'stlu' returns NO, then the symbol is not present, and 'lookup'  
  82. returns NO. 
  83. Otherwise, 'lookup' copies the information field from the appropriate   
  84. node of the symbol table into the information array and returns 
  85. YES.
  86. .am 
  87. info
  88. .ca 
  89. stlu
  90. .sa 
  91. enter (2), delete (2), mktabl (2), rmtabl (2), stlu (2),
  92. sctabl (2), dsinit (2), dsget (2), dsfree (2)   
  93.