HELP IDENTPROPS A.Sloman Nov 1986
identprops(<word or identifier>) -> syntactic_type
IDENTPROPS takes a word or identifier as argument, and returns its
syntactic type. For full technical details see REF *IDENT.
CONTENTS - (Use <ENTER> g to access sections)
-- Introduction
-- Possible results of IDENTPROPS are
-- Discovering the identprops of a word in VED
-- Assigning identprops
-- RELATED DOCUMENTATION
-- Introduction -------------------------------------------------------
The POP-11 system does not treat all words alike when compiling.
For example
vars x; 3 -> x;
is permissible, whilst
vars if; 3 -> if;
is not. This is because IF is a 'syntax' word, as a call of IDENTPROPS
shows:
identprops("if") =>
** syntax
-- Possible results of IDENTPROPS are --------------------------------
- "undef"
for a word not declared as a permanent identifier (though it may
have been used as a lexical identifier).
- 0
for a 'normal' (untyped) identifier (e.g. HD, TL, POPPROMPT etc)
- N (An integer)
For a POP-11 operator of precendence N, where N is an integer or
floating-point in the range -12.7 to 12.7 . Examples of standard
POP-11 operators are:
= (N=7), + (N=5), * (N=4), div (N=2), <> (N=5), :: (N=4)
(For more examples see HELP * SYSWORDS)
- "syntax"
For an ordinary syntax word (e.g. if, and, define etc)
- "syntax N" (N an integer)
For syntactic operators of precedence N. (This sort of word including
a space cannot be typed in directly to POP-11 but can be constructed
using *CONSWORD.) Examples of syntactic operators are "(", ".",
"->", ":"
- "macro"
For POP-11 macros. See HELP * MACROS, REF * PROGLIST
-- Discovering the identprops of a word in VED ------------------------
The easiest way to find out about the identprops of a POP-11 identifier
is to place the VED cursor immediately to its left then do
<ENTER> wtype
-- Assigning identprops -----------------------------------------------
The IDENTPROPS of user-defined identifiers may be defined using
*VARS *CONSTANT *DEFINE, or the virtual machine instructions defined in
REF * VMCODE
The identprops of a word is actually the identprops of the identifier
currently associated with it, and that can change from one section to
another, as explained in HELP * IDENTIFIERS and HELP *SECTIONS
-- RELATED DOCUMENTATION ----------------------------------------------
REF *WORDS
- on the representation of words in POP-11
REF *IDENT
- on the relation between words and identifiers
HELP *FULL_IDENTPROPS
- gives more information about a word than identprops
HELP *IDENTTYPE
- gives the type of a variable.
HELP *IDENTIFIERS
- summary of use and recognition of identifiers in POP-11
HELP *VARS
- declaring variables
HELP *DLOCAL
- making varibles local to a procedure without changing their
syntactic properties. Also sets entry and exit actions.
HELP *LEXICAL
- lexically scoped identifiers
HELP *CONSTANT
- declaring constants
HELP *ACTIVE_VARIABLES
- declaring and using 'active' variables
REF *SECTIONS
- technical information on sections
--- C.all/help/identprops ----------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------Author: A.Sloman Nov 1986