Search Top Index
HELP DESTPROCS Andrew Law, June 1987 This file describes various destructor procedures. These procedures usually take some datatype and either return (and/or leave on the stack) some specification of its structure (e.g., its head and tail or length and contents). The procedures do not actually "destroy" the original structure, unless this is specified in the call, e.g.; vars list = [the_head the_tail], head, tail; dest(list) -> tail -> head; head => ** the_head tail => ** [the_tail] list => ** [the_head the_tail] dest(list) -> list -> head; list => ** [the_tail] class_dest(KEY) -> PROCEDURE Gives the destructor procedure for the class KEY -- REF *KEYS, HELP *CLASSES, *KEYS dest(LIST) -> LIST:T -> ITEM:H This procedure returns both the *HD and the *TL of the given LIST (faster than *HD or *TL on their owm) destlist(LIST) -> INTEGER Puts each element of LIST onto the stack, and returns the number of elements destpair(PAIR) -> ITEM:B -> ITEM:F This procedure behaves like *DEST except that it does not expand dynamic lists. fast_destpair(PAIR) -> ITEM:F -> ITEM:B Non-checking -destpair-, returns the -front- (F) and the -back- (B) of PAIR sys_grbg_destpair(PAIR) -> ITEM:B -> ITEM:F This, like DESTPAIR and FAST_DESTPAIR takes a pair and puts the front and the back of the pair on the stack. It also returns the pair itself to the "free list", unlike sys_grbg_list, which returns a whole chain of pairs to the free list. dl(LIST) Puts all the elements of LIST on the stack -- HELP *DEST, *LISTS, REF *LISTS, * FASTPROCS dest_characters(ITEM) This procedure returns the character codes which would be used for printing the ITEM in the default format -- HELP *DEST_CHARACTERS, *ASCII destratio(RATIONAL) -> INTEGRAL:D -> INTEGRAL:N Returns the numerator (N) and denominator (D) of RATIONAL -- REF * NUMBERS destcomplex(NUMBER) -> NUMBER:I -> NUMBER:R Returns the real (R) and imaginary (I) parts of NUMBER -- REF *NUMBERS, HELP *NUMBERS deststring(STRING) -> INTEGER Puts each character of STRING onto the stack, and returns the number of characters -- REF * STRINGS destintvec(VECTOR) Destructs the integer VECTOR, i.e. puts all its elements on the stack, together with its length (in other words, does the opposite of -consintvec-). -- HELP * VECTORS, REF * VECTORS, *INTVEC destvector(VECTOR) -> INTEGER Puts each element of VECTOR onto the stack, and returns the number of elements -- REF * VECTORS destword(WORD) -> INTEGER Puts each character of WORD onto the stack, and returns the number of characters -- REF * WORDS destprologterm(prologterm) This procedure explodes an object of type <prologterm> (built by -consprologterm-). -- ASSOCIATED DOCUMENTATION ------------------------------------------- *FILL - filling in vectors from items on stack *STACK - procedures dealing with the stack *CLASSES - info. on POP-11 dataclasses *EXPLODE - puts all the elements of a structure on the stack. *DATA - info. on POP-11 datatypes and *KEYS - info. on POP-11 keys --- C.all/help/destprocs ----------------------------------------------- --- Copyright University of Sussex 1987. All rights reserved. ----------