home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: prockind.icn
- #
- # Subject: Procedure to produce code according to kind of procedure
- #
- # Author: Ralph E. Griswold
- #
- # Date: September 17, 1992
- #
- ###########################################################################
- #
- # prockind(p) produces a code for the kind of the procedure p as follows:
- #
- # "p" (declared) procedure
- # "f" (built-in) function
- # "o" operator
- # "c" record constructor
- #
- # It fails if p is not of type procedure.
- #
- ############################################################################
-
- procedure prockind(p)
-
- if type(p) ~== "procedure" then fail
-
- image(p) ? {
- if find("procedure") then return "p"
- if find("record constructor") then return "c"
- ="function "
- if upto(&letters) then return "f" else return "o"
- }
-
- end
-
-