home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
10651
< prev
next >
Wrap
Text File
|
1994-06-19
|
62KB
|
1,294 lines
Path: wupost!cs.utexas.edu!howland.reston.ans.net!spool.mu.edu!nigel.msen.com!zib-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!ag
From: ag@MuwiInfa.Geschichte.Uni-Mainz.DE (Albert Graef)
Newsgroups: alt.sources
Subject: Q - applicative programming language V1.7 - part 14/19
Followup-To: alt.sources.d
Date: 14 Jun 1994 08:52:54 GMT
Organization: Musikinformatik, JoGu-Uni Mainz
Lines: 1281
Distribution: world
Message-ID: <2tjr56$398@bambi.zdv.uni-mainz.de>
NNTP-Posting-Host: muwiinfa.geschichte.uni-mainz.de
Archive-name: q-1.7/part14
Submitted-by: ag@muwiinfa.geschichte.uni-mainz.de
#!/bin/sh
# this is q-1.7.shar.14 (part 14 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file q-1.7/qdoc.info continued
#
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 14; then
echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping q-1.7/qdoc.info'
else
echo 'x - continuing file q-1.7/qdoc.info'
sed 's/^X//' << 'SHAR_EOF' >> 'q-1.7/qdoc.info' &&
X : <CR>
X ** fac 0 => 1 bingo! reduce `fac 0' to `1'
X fac 1 => 1*fac (1-1) return to the suspended rule
X : <CR>
X ** 1*1 => 1
X ** fac 1 => 1 final reduction ...
X 1 ... and the result printed by
X the interpreter
X =>
X
X
XFile: qdoc.info, Node: References, Next: Index, Prev: Debugging, Up: Top
X
XReferences
X**********
X
XH. Abelson and G.J. Sussman. `Structure and Interpretation of Computer
XPrograms.' MIT Press, Cambridge, Mass., 1985.
X
XAdobe Systems Incorporated. `PostScript Language Reference Manual.
XSecond Edition.' Addison-Wesley, Reading, Mass., 1990.
X
XR. Bird and P. Wadler. `Introduction to Functional Programming.'
XPrentice Hall, New York, 1988.
X
XN. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen,
Xeditor, `Handbook of Theoretical Computer Science. B: Formal Models and
XSemantics,' pages 243-320. North-Holland, Amsterdam, 1990.
X
XAlbert Graef. Left-to-right tree pattern matching. In `Proceedings
XRewriting Techniques and Applications '91,' LNCS 488, pages 323-334.
XSpringer, Berlin, 1991.
X
XP. Henderson. `Functional Programming: Application and Implementation.'
XPrentice Hall, New York, 1980.
X
XM.C. Henson. `Elements of Functional Languages.' Blackwell Scientific
XPublications, Oxford, 1987.
X
XJ.W. Klop. Term rewriting systems. TR CS-R9073, Centrum voor Wiskunde en
XInformatica, Amsterdam (NL), 1990.
X
XG. Marsaglia and A. Zaman. Florida State University Report
XFSU-SCRI-87-50, 1987.
X
XR. Milner, M. Tofte and R. Harper. `The Definition of Standard ML.' MIT
XPress, 1990.
X
XM.J. O'Donnell. `Equational Logic as a Programming Language.' MIT Press,
XCambridge, Mass., 1985.
X
XG.L. Steele, Jr. and G.J. Sussman. Scheme: An interpreter for the
Xextended lambda calculus. Memo 349, MIT Artificial Intelligence
XLaboratory, 1975.
X
X
XFile: qdoc.info, Node: Index, Prev: References, Up: Top
X
XIndex
X*****
X
X* Menu:
X
X* fcopy, tail-recursive implementation: File I/O.
X* abort evaluation with halt: Miscellaneous Functions.
X* abs: Standard Functions.
X* abstract data type (ADT): Using Type Guards.
X* abstract type: Sub- and Supertypes.
X* abstract type: Type Guards.
X* acos: Mathematical Functions.
X* active rules: Performing Reductions on a Stack.
X* added value scripts: The Standard Library.
X* additional string functions: Additional String Functions.
X* and: Logical Operators.
X* append: Arrays.
X* append: Standard Functions.
X* applicable equation: Normal Forms and Reduction Strategy.
X* application: Applications.
X* applicative order evaluation: Normal Forms and Reduction Strategy.
X* apply: Standard Functions.
X* applyq: Standard Functions.
X* arc: Path Construction.
X* arct: Path Construction.
X* ARGS: Variable Definitions.
X* argument: Applications.
X* argument list: Declarations and Variable Definitions.
X* arithmetic operators: Arithmetic Operators.
X* array: Arrays.
X* Array: Arrays.
X* array.q: Arrays.
X* array2: Arrays.
X* arrays: Arrays.
X* asin: Mathematical Functions.
X* assert: Diagnostics and Error Messages.
X* assert.q: Diagnostics and Error Messages.
X* assertions: Diagnostics and Error Messages.
X* associative arrays: Dictionaries.
X* atan: Numeric Functions.
X* AVL tree: Sub- and Supertypes.
X* bag: Bags.
X* Bag: Bags.
X* bag.q: Bags.
X* bags: Bags.
X* basic expressions: Expressions.
X* batch mode: Running Compiler and Interpreter.
X* binary minus: Built-In Operators.
X* binary search tree: Using Type Guards.
X* binding clause: List Comprehensions.
X* Bool: Built-In Types.
X* bounding box (EPSF): DSC and EPSF Comments.
X* break: Miscellaneous Functions.
X* breakpoint: Miscellaneous Functions.
X* built-in constants: Constants and Variables.
X* built-in equations: Normal Forms and Reduction Strategy.
X* built-in special forms: Built-In Special Forms.
X* built-in types: Built-In Types.
X* cat: Standard Functions.
X* cdr'ing down a list: Equations.
X* character sequences: Constants and Variables.
X* character sequences: Lexical Matters.
X* charpath: Path Construction.
X* chars: Additional String Functions.
X* chr: Conversion Functions.
X* clip: Clipping.
X* clippath: Path Construction.
X* clipping path: Overview of Graphics Operations.
X* closepath: Path Construction.
X* closing a file: File I/O.
X* closing a path: Overview of Graphics Operations.
X* code file: Running Compiler and Interpreter.
X* Color: Graphics State.
X* combinatorial calculus: Higher-Order Functions.
X* command: Pipes.
X* command line arguments: Running Compiler and Interpreter.
X* comment: Lexical Matters.
X* compiler: Running Compiler and Interpreter.
X* complete evaluation: Logical Operators.
X* compose: Standard Functions.
X* compound expressions: Expressions.
X* concrete type: Sub- and Supertypes.
X* cond: Other Special Forms.
X* condition part: Equations.
X* conditional clause: List Comprehensions.
X* conditional equation: Equations.
X* conditional expression: Basic Concepts.
X* conditional rule, application of: Conditional Rules.
X* cons: Standard Functions.
X* consq: Standard Functions.
X* const: Declarations and Variable Definitions.
X* constant symbol: Declarations and Variable Definitions.
X* container data structures: Standard Types.
X* conversion functions: Conversion Functions.
X* coordinate system: Coordinate System.
X* copies: Miscellaneous Operations.
X* copypage: Miscellaneous Operations.
X* cos: Numeric Functions.
X* cosh: Mathematical Functions.
X* cst: Standard Functions.
X* currying: Applications.
X* curveto: Path Construction.
X* cyclic inclusion: Include Scripts.
X* dash pattern: Graphics State.
X* data structure: Using Type Guards.
X* debugger: Debugging.
X* debugger commands: Debugging.
X* debugger session: Debugging.
X* debugger, activation of: Debugging.
X* declarations: Declarations and Variable Definitions.
X* declarations, consistency: Declarations and Variable Definitions.
X* def: Variable Definitions.
X* default case: Equations.
X* default declaration: Declarations and Variable Definitions.
X* defer: Other Special Forms.
X* delete: Dictionaries.
X* delete: Sets.
X* diagnostics: Diagnostics and Error Messages.
X* dict: Dictionaries.
X* Dict: Dictionaries.
X* dict.q: Dictionaries.
X* dictionaries: Dictionaries.
X* digit sequence: Lexical Matters.
X* disambiguating rules: Normal Forms and Reduction Strategy.
X* disjunctive normal form: Built-In Special Forms.
X* div: Arithmetic Operators.
X* division by zero: Definitions and Expression Evaluation.
X* do: Standard Functions.
X* document structuring conventions: DSC and EPSF Comments.
X* domain: Applications.
X* double quotes: Lexical Matters.
X* drawing: Overview of Graphics Operations.
X* driver program: Running Compiler and Interpreter.
X* drop: Standard Functions.
X* dropwhile: Standard Functions.
X* DSC: DSC and EPSF Comments.
X* e: Mathematical Functions.
X* each: Standard Functions.
X* empty list: Constants and Variables.
X* empty qualifier: Equations.
X* empty tuple: Constants and Variables.
X* emptybag: Bags.
X* emptydict: Dictionaries.
X* emptyheap: Heaps.
X* emptyset: Sets.
X* encapsulated PostScript: DSC and EPSF Comments.
X* environment file: Variable Definitions.
X* environment variables: Environment Variables.
X* eoclip: Clipping.
X* eof: I/O Functions.
X* eofill: Painting.
X* EPSF: DSC and EPSF Comments.
X* eq: Standard Functions.
X* equality operator, on left-hand side of equation: Equations.
X* equality, container data structures: Standard Types.
X* equality, lists: Standard Functions.
X* equality, streams: Streams.
X* equality, truth values: Standard Functions.
X* equality, tuples: Standard Functions.
X* equation: Equations.
X* erasepage: Miscellaneous Operations.
X* ERROR: Variable Definitions.
X* error: Diagnostics and Error Messages.
X* error conditions: Error Handling.
X* error message printing: Diagnostics and Error Messages.
X* error.q: Diagnostics and Error Messages.
X* escape sequences: Lexical Matters.
X* escape sequences, in filenames: Scripts.
X* evaluation stack: Performing Reductions on a Stack.
X* exception: Normal Forms and Reduction Strategy.
X* exist: Standard Functions.
X* exists: File I/O.
X* exit interpreter with quit: Miscellaneous Functions.
X* exp: Numeric Functions.
X* exponential function: Numeric Functions.
X* expression: Expressions.
X* expression predicates: Expression Predicates.
X* expression value: Normal Forms and Reduction Strategy.
X* fac: Writing a Script.
X* factorial function: Writing a Script.
X* factorial function, tail-recursive implementation: Tail Recursion.
X* fcopy: File I/O.
X* feof: I/O Functions.
X* fib: Equations.
X* Fibonacci function: Equations.
X* Fibonacci function, tail-recursive implementation: Tail Recursion.
X* File: Built-In Types.
X* file I/O: File I/O.
X* file object: File I/O.
X* file object, unparsing: File I/O.
X* filename: File I/O.
X* fill: Painting.
X* filling: Overview of Graphics Operations.
X* filter: Standard Functions.
X* finite streams: Special Constructors.
X* first: Dictionaries.
X* first: Sets.
X* first: Heaps.
X* first: Arrays.
X* float: Mathematical Functions.
X* Float: Built-In Types.
X* floating point format string: Environment Variables.
X* floating point number: Constants and Variables.
X* flushpage: Miscellaneous Operations.
X* FLUSHPAGE: Overview of Graphics Operations.
X* fmod: Mathematical Functions.
X* foldl: Standard Functions.
X* foldl1: Standard Functions.
X* foldr: Standard Functions.
X* foldr1: Standard Functions.
X* font: Graphics State.
X* fopen: File I/O.
X* fopen: I/O Functions.
X* force: Other Special Forms.
X* formal parameters: Equations.
X* formal parameters: Constants and Variables.
X* frac: Conversion Functions.
X* fread: I/O Functions.
X* freadc: I/O Functions.
X* freadq: I/O Functions.
X* freads: I/O Functions.
X* free variable: Free Variables.
X* free variable symbol: Declarations and Variable Definitions.
X* fst: Standard Functions.
X* function: Applications.
X* function symbol: Lexical Matters.
X* fwrite: I/O Functions.
X* fwritec: I/O Functions.
X* fwriteq: I/O Functions.
X* fwrites: I/O Functions.
X* genlist: Standard Functions.
X* genstream: Streams.
X* Ghostscript: Graphics.
X* GRAPHICS: Graphics.
X* graphics: Graphics.
X* graphics state: Overview of Graphics Operations.
X* graphics.q: Graphics.
X* grestore: Graphics State.
X* gsave: Graphics State.
X* halt: Miscellaneous Functions.
X* hd: Standard Functions.
X* header: Declarations and Variable Definitions.
X* heap: Heaps.
X* Heap: Heaps.
X* heap.q: Heaps.
X* heaps: Heaps.
X* hidden constructors: Type Guards.
X* hiding implementation details: Using Type Guards.
X* higher-order functions: Higher-Order Functions.
X* I/O functions: I/O Functions.
X* id: Standard Functions.
X* identifier: Lexical Matters.
X* include: Scripts.
X* include directive: Scripts.
X* infix operator symbols: Expressions.
X* information hiding: Using Type Guards.
X* inheritance: Sub- and Supertypes.
X* init: Standard Functions.
X* INPUT: Variable Definitions.
X* input and output: I/O Functions.
X* insert: Dictionaries.
X* insert: Sets.
X* insert: Heaps.
X* insert: Arrays.
X* int: Conversion Functions.
X* Int: Built-In Types.
X* integer: Constants and Variables.
X* interactive mode: Running Compiler and Interpreter.
X* interpreter: Running Compiler and Interpreter.
X* interrupt key: Error Handling.
X* ints: Streams.
X* isapp: Expression Predicates.
X* isarray: Arrays.
X* isbag: Bags.
X* isbool: Expression Predicates.
X* ischar: Expression Predicates.
X* iscons: Expression Predicates.
X* isconst: Miscellaneous Functions.
X* isdef: Miscellaneous Functions.
X* isdict: Dictionaries.
X* isempty: Dictionaries.
X* isempty: Sets.
X* isempty: Heaps.
X* isempty: Arrays.
X* isfile: Expression Predicates.
X* isfloat: Expression Predicates.
X* isfun: Miscellaneous Functions.
X* isheap: Heaps.
X* isint: Expression Predicates.
X* ismember: Dictionaries.
X* ismember: Sets.
X* isnum: Expression Predicates.
X* ispair: Expression Predicates.
X* isset: Sets.
X* isspecial: Miscellaneous Functions.
X* isstr: Expression Predicates.
X* isstream: Streams.
X* issym: Expression Predicates.
X* isvar: Miscellaneous Functions.
X* iterative algorithm: Tail Recursion.
X* join: Additional String Functions.
X* keys: Dictionaries.
X* lambda: Lambda Calculus.
X* lambda calculus: Lambda Calculus.
X* lambda calculus: Higher-Order Functions.
X* lambda, with side-effects: Lambda Calculus.
X* lambda, with special forms: Lambda Calculus.
X* lambda.q: Lambda Calculus.
X* last: Dictionaries.
X* last: Sets.
X* last: Arrays.
X* last: Standard Functions.
X* left-hand side: Equations.
X* leftmost-innermost evaluation: Normal Forms and Reduction Strategy.
X* leftsect: Miscellaneous Functions.
X* leftsect: Built-In Special Forms.
X* lex.q: Lexicographic List Ordering.
X* lexicographic ordering, lists: Lexicographic List Ordering.
X* lexicographic ordering, strings: Relational Operators.
X* lexicographic ordering, tuples: Lexicographic List Ordering.
X* lg: Mathematical Functions.
X* library scripts: Include Scripts.
X* lineto: Path Construction.
X* list: Streams.
X* List: Built-In Types.
X* list: Lists and Tuples.
X* list comprehensions: List Comprehensions.
X* list concatenation: String and List Operations.
X* list operators: String and List Operations.
X* list.q: List Comprehensions.
X* listof: List Comprehensions.
X* literal expression: The Special Form Quote.
X* ln: Numeric Functions.
X* log: Mathematical Functions.
X* logarithm: Numeric Functions.
X* logical operators: Logical Operators.
X* ls: Pipes.
X* map: Standard Functions.
X* math.q: Mathematical Functions.
X* mathematical functions: Numeric Functions.
X* mathematical functions (math.q): Mathematical Functions.
X* max: Standard Functions.
X* members: Dictionaries.
X* members: Sets.
X* members: Heaps.
X* members: Arrays.
X* members2: Arrays.
X* mergesort: Sorting Algorithms.
X* min: Standard Functions.
X* mkarray: Arrays.
X* mkarray2: Arrays.
X* mkdict: Dictionaries.
X* mklist: Standard Functions.
X* mkstream: Streams.
X* mod: Arithmetic Operators.
X* mode argument (fopen): File I/O.
X* mode argument (popen): Pipes.
X* modifier: Declarations and Variable Definitions.
X* module dependencies: Include Scripts.
X* more: Pipes.
X* moveto: Path Construction.
X* msort: Sorting Algorithms.
X* multi-line mode: Running Compiler and Interpreter.
X* multiple declarations: Declarations and Variable Definitions.
X* multisets: Bags.
X* name clashes: Private Symbols.
X* narc: Path Construction.
X* negative numbers: Built-In Operators.
X* neq: Standard Functions.
X* nested includes: Include Scripts.
X* nested lists: Lists and Tuples.
X* nested tuples: Lists and Tuples.
X* newline character: Lexical Matters.
X* newpath: Path Construction.
X* Newton's algorithm: Writing a Script.
X* non-linear equation: Non-Linear Equations and Syntactic Equality.
X* normal form: Normal Forms and Reduction Strategy.
X* not: Logical Operators.
X* null character: Constants and Variables.
X* Num: Built-In Types.
X* numeric constants: Lexical Matters.
X* numeric constants, range and precision: Constants and Variables.
X* numeric functions: Numeric Functions.
X* object file: Scripts.
X* operator associativity: Built-In Operators.
X* operator precedence: Built-In Operators.
X* operator symbols: Built-In Operators.
X* operator, as prefix function: Built-In Operators.
X* operators, on left-hand side of equation: Equations.
X* options, compiler and interpreter: Running Compiler and Interpreter.
X* or: Logical Operators.
X* ord: Conversion Functions.
X* otherwise: Equations.
X* OUTPUT: Variable Definitions.
X* overlapping equations: Include Scripts.
X* overloading logical operations: Built-In Special Forms.
X* page description: Graphics.
X* painting: Overview of Graphics Operations.
X* pair: Standard Functions.
X* pairq: Standard Functions.
X* parsing expressions: Conversion Functions.
X* path: Overview of Graphics Operations.
X* pattern: Equations.
X* pi: Mathematical Functions.
X* pipe: Pipes.
X* plain.q: Using the Interpreter.
X* point unit: Coordinate System.
X* polymorphic operation: Sub- and Supertypes.
X* pop: Standard Functions.
X* popen: I/O Functions.
X* pos: String Functions.
X* position, in string: String Functions.
X* PostScript: Graphics.
X* prd: Standard Functions.
X* predefined type symbols: Type Guards.
X* predefined type symbols: Declarations and Variable Definitions.
X* prefix operator symbols: Expressions.
X* primitive operation: Normal Forms and Reduction Strategy.
X* priority queues: Heaps.
X* private: Declarations and Variable Definitions.
X* private constructors: Using Type Guards.
X* private constructors: Declarations and Variable Definitions.
X* private namespace: Private Symbols.
X* private symbol: Private Symbols.
X* private symbol: Declarations and Variable Definitions.
X* private symbols, notation: Private Symbols.
X* prompt string: Environment Variables.
X* ps: Miscellaneous Operations.
X* psfile: Miscellaneous Operations.
X* psheader: Miscellaneous Operations.
X* psstr: Miscellaneous Operations.
X* public: Declarations and Variable Definitions.
X* public symbol: Private Symbols.
X* public symbol: Declarations and Variable Definitions.
X* public symbols, redeclared private: Private Symbols.
X* push: Standard Functions.
X* q: Running Compiler and Interpreter.
X* Q code: Using Q.
X* q.env: Variable Definitions.
X* q.out: Running Compiler and Interpreter.
X* qc: Running Compiler and Interpreter.
X* QFS: Environment Variables.
X* qi: Running Compiler and Interpreter.
X* QPATH: Environment Variables.
X* QPS: Environment Variables.
X* qsort: Sorting Algorithms.
X* qualifier: Equations.
X* quasiquote: Other Special Forms.
X* quicksort: Sorting Algorithms.
X* quit: Miscellaneous Functions.
X* quote: Miscellaneous Functions.
X* quote: The Special Form Quote.
X* quoted expression: The Special Form Quote.
X* random: Numeric Functions.
X* random numbers: Numeric Functions.
X* range: Standard Functions.
X* range: Applications.
X* rcurveto: Path Construction.
X* read: I/O Functions.
X* readc: I/O Functions.
X* readq: I/O Functions.
X* reads: I/O Functions.
X* reciprocal function: Sections.
X* recursive definition: Tail Recursion.
X* recursive evaluation: Performing Reductions on a Stack.
X* recursive lambdas: Lambda Calculus.
X* redex: Normal Forms and Reduction Strategy.
X* reduction: Normal Forms and Reduction Strategy.
X* reduction stack: Performing Reductions on a Stack.
X* reduction strategy: Normal Forms and Reduction Strategy.
X* reductions, tracing of: Debugging.
X* relational operators: Relational Operators.
X* repeat: Standard Functions.
X* reserved words: Lexical Matters.
X* restorematrix: Graphics State.
X* reverse: Standard Functions.
X* rewriting model: Performing Reductions on a Stack.
X* right-hand side: Equations.
X* rightsect: Miscellaneous Functions.
X* rightsect: Built-In Special Forms.
X* rlineto: Path Construction.
X* rmfirst: Dictionaries.
X* rmfirst: Sets.
X* rmfirst: Heaps.
X* rmfirst: Arrays.
X* rmlast: Dictionaries.
X* rmlast: Sets.
X* rmlast: Arrays.
X* rmoveto: Path Construction.
X* rotate: Graphics State.
X* round: Conversion Functions.
X* rule: Equations.
X* runtime error: Error Handling.
X* savematrix: Graphics State.
X* scale: Graphics State.
X* scaling factor: Lexical Matters.
X* scan: Standard Functions.
X* scan1: Standard Functions.
X* scope: Declarations and Variable Definitions.
X* scope, symbol in type declaration: Declarations and Variable Definitions.
X* scope-modifier prefix: Declarations and Variable Definitions.
X* script: Scripts.
X* search path: Environment Variables.
X* search tree operations: Using Type Guards.
X* section: Sections.
X* sections, implementation: Built-In Special Forms.
X* seed: Numeric Functions.
X* separate compilation: Include Scripts.
X* sequence operator: The Sequence Operator.
X* sequence operator, used with I/O operations: Terminal I/O.
X* set: Sets.
X* Set: Sets.
X* set breakpoints with break: Miscellaneous Functions.
X* set.q: Sets.
X* set/bag comparison: Standard Types.
X* set/bag difference: Standard Types.
X* set/bag intersection: Standard Types.
X* set/bag union: Standard Types.
X* setcmykcolor: Graphics State.
X* setcolor: Graphics State.
X* setdash: Graphics State.
X* setfont: Graphics State.
X* setgray: Graphics State.
X* sethsbcolor: Graphics State.
X* setlinecap: Graphics State.
X* setlinejoin: Graphics State.
X* setlinewidth: Graphics State.
X* setrgbcolor: Graphics State.
X* sets: Sets.
X* sgn: Standard Functions.
X* short circuit evaluation: Logical Operators.
X* short-circuit mode: Built-In Special Forms.
X* show: Painting.
X* showerr: Diagnostics and Error Messages.
X* showpage: Miscellaneous Operations.
X* side-effects, in I/O operations: I/O Functions.
X* sieve of Erathosthenes: Streams.
X* sin: Numeric Functions.
X* sinh: Mathematical Functions.
X* size operator: String and List Operations.
X* size operator, container data structures: Standard Types.
X* snd: Standard Functions.
X* sort.q: Sorting Algorithms.
X* sorting algorithms: Sorting Algorithms.
X* special: Declarations and Variable Definitions.
X* special argument: Basic Concepts.
X* special case rule: Normal Forms and Reduction Strategy.
X* special constructor: Special Constructors.
X* special form: Special Forms.
X* special.q: Other Special Forms.
X* splice: Other Special Forms.
X* split: Additional String Functions.
X* sqrt: Numeric Functions.
X* square root: Numeric Functions.
X* standard error device: Variable Definitions.
X* standard functions: Standard Functions.
X* standard input/output devices: Variable Definitions.
X* standard library scripts: The Standard Library.
X* standard types: Standard Types.
X* state variables: Tail Recursion.
X* std.q: The Standard Library.
X* stdlib.q: Standard Functions.
X* stdm.q: The Standard Library.
X* stdtypes.q: Standard Types.
X* str: Conversion Functions.
X* strcat: Additional String Functions.
X* stream: Streams.
X* Stream: Streams.
X* stream: Special Constructors.
X* stream comprehensions: Streams.
X* stream.q: Streams.
X* streamcat: Streams.
X* streamof: Streams.
X* streamp: Streams.
X* streams: Streams.
X* streams, overloaded list operations: Streams.
X* String: Built-In Types.
X* string: Constants and Variables.
X* string comparison: Relational Operators.
X* string concatenation: String and List Operations.
X* string constants: Lexical Matters.
X* string functions: String Functions.
X* string functions (string.q): Additional String Functions.
X* string operators: String and List Operations.
X* string.q: Additional String Functions.
X* stroke: Painting.
X* strq: Conversion Functions.
X* subpath: Overview of Graphics Operations.
X* subscript operator: String and List Operations.
X* substr: String Functions.
X* subtype: Sub- and Supertypes.
X* sum: Standard Functions.
X* supertype: Sub- and Supertypes.
X* syntactic equality: Non-Linear Equations and Syntactic Equality.
X* syntactic identity: Non-Linear Equations and Syntactic Equality.
X* tab character: Lexical Matters.
X* tail recursion: Tail Recursion.
X* tail recursion optimization: Tail Recursion.
X* tail reduction: Tail Recursion.
X* tail-recursive programming: Tail Recursion.
X* take: Standard Functions.
X* takewhile: Standard Functions.
X* tan: Mathematical Functions.
X* tanh: Mathematical Functions.
X* terminal I/O: Terminal I/O.
X* terminal input: Terminal I/O.
X* terminal output: Terminal I/O.
X* text output (graphics): Overview of Graphics Operations.
X* tl: Standard Functions.
X* top: Standard Functions.
X* translate: Graphics State.
X* trigonometric functions: Numeric Functions.
X* trunc: Conversion Functions.
X* truth values: Constants and Variables.
X* tuple: Lists and Tuples.
X* tuples and parenthesized expressions: Built-In Operators.
X* type: Types.
X* type declaration: Using Type Guards.
X* type declaration: Declarations and Variable Definitions.
X* type guard: Types.
X* type guard: Type Guards.
X* type hierarchy: Type Guards.
X* type identifier: Declarations and Variable Definitions.
X* type.q: Expression Predicates.
X* unary minus: Built-In Operators.
X* undef: Variable Definitions.
X* unit length: Coordinate System.
X* universal quantification: Equations.
X* unparsing expressions: Conversion Functions.
X* until: Standard Functions.
X* unzip: Standard Functions.
X* update: Dictionaries.
X* update: Arrays.
X* update2: Arrays.
X* val: Conversion Functions.
X* valq: Conversion Functions.
X* vals: Dictionaries.
X* value: Standard Functions.
X* var: Declarations and Variable Definitions.
X* variable binding (listof): List Comprehensions.
X* variable bindings: Performing Reductions on a Stack.
X* variable definition: Declarations and Variable Definitions.
X* variable definition, command line: Variable Definitions.
X* variable symbol: Lexical Matters.
X* variable, as constant value: Free Variables.
X* variable, multiple occurrence on left-hand side: Non-Linear Equations and Syntactic Equality.
X* variadic functions: Applications.
X* warning messages: Include Scripts.
X* write: I/O Functions.
X* writec: I/O Functions.
X* writeq: I/O Functions.
X* writes: I/O Functions.
X* zip: Standard Functions.
X* \": Lexical Matters.
X* \0: Constants and Variables.
X* \b: Lexical Matters.
X* \f: Lexical Matters.
X* \n: Lexical Matters.
X* \r: Lexical Matters.
X* \t: Lexical Matters.
X* \\: Lexical Matters.
X
X
X
XTag Table:
XNode: Top1369
XNode: Introduction1928
XNode: Getting Started10669
XNode: Using the Interpreter11644
XNode: Using the Standard Library14502
XNode: Writing a Script18615
XNode: Definitions and Expression Evaluation20803
XNode: Runtime Errors25342
XNode: Lexical Matters27421
XNode: Declarations and Variable Definitions31544
XNode: Expressions39187
XNode: Constants and Variables41599
XNode: Applications43996
XNode: Lists and Tuples48942
XNode: Built-In Operators51983
XNode: Arithmetic Operators54994
XNode: Relational Operators56062
XNode: Logical Operators57806
XNode: String and List Operations59159
XNode: The Sequence Operator60147
XNode: Sections60845
XNode: Equations and Expression Evaluation62192
XNode: Equations63647
XNode: Higher-Order Functions69266
XNode: Non-Linear Equations and Syntactic Equality72253
XNode: Free Variables74982
XNode: Type Guards76799
XNode: Normal Forms and Reduction Strategy80430
XNode: Conditional Rules88656
XNode: Performing Reductions on a Stack90231
XNode: Tail Recursion96463
XNode: Error Handling101649
XNode: Scripts103378
XNode: Include Scripts105382
XNode: Private Symbols108280
XNode: Types110483
XNode: Using Type Guards111138
XNode: Built-In Types117133
XNode: Sub- and Supertypes119119
XNode: Special Forms124725
XNode: Basic Concepts125538
XNode: Form of Special Declarations130062
XNode: Special Constructors130971
XNode: Built-In Special Forms133226
XNode: The Special Form Quote137060
XNode: Built-In Functions138196
XNode: Numeric Functions138862
XNode: String Functions140021
XNode: Conversion Functions141146
XNode: I/O Functions142840
XNode: Terminal I/O144029
XNode: File I/O147081
XNode: Pipes150606
XNode: Miscellaneous Functions152629
XNode: The Standard Library155035
XNode: Standard Functions157400
XNode: Additional String Functions160891
XNode: Expression Predicates161601
XNode: Sorting Algorithms162415
XNode: Standard Types163033
XNode: Arrays164045
XNode: Heaps165333
XNode: Sets166558
XNode: Bags167579
XNode: Dictionaries168074
XNode: Lambda Calculus169597
XNode: List Comprehensions170846
XNode: Streams172442
XNode: Other Special Forms175201
XNode: Mathematical Functions176952
XNode: Graphics177546
XNode: Coordinate System179904
XNode: Overview of Graphics Operations180567
XNode: Path Construction186667
XNode: Painting188808
XNode: Clipping189468
XNode: Graphics State189954
XNode: Miscellaneous Operations193400
XNode: DSC and EPSF Comments195077
XNode: Lexicographic List Ordering197234
XNode: Diagnostics and Error Messages197673
XNode: Q Language Grammar198488
XNode: Using Q202307
XNode: Running Compiler and Interpreter203554
XNode: Variable Definitions210984
XNode: Running Scripts from the Shell214329
XNode: Environment Variables215393
XNode: Debugging216887
XNode: References220725
XNode: Index222257
X
XEnd Tag Table
SHAR_EOF
echo 'File q-1.7/qdoc.info is complete' &&
chmod 0644 q-1.7/qdoc.info ||
echo 'restore of q-1.7/qdoc.info failed'
Wc_c="`wc -c < 'q-1.7/qdoc.info'`"
test 264239 -eq "$Wc_c" ||
echo 'q-1.7/qdoc.info: original size 264239, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= q-1.7/texinfo.tex ==============
if test -f 'q-1.7/texinfo.tex' -a X"$1" != X"-c"; then
echo 'x - skipping q-1.7/texinfo.tex (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting q-1.7/texinfo.tex (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'q-1.7/texinfo.tex' &&
X%% TeX macros to handle texinfo files
X
X% Copyright (C) 1985, 86, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
X
X%This texinfo.tex file is free software; you can redistribute it and/or
X%modify it under the terms of the GNU General Public License as
X%published by the Free Software Foundation; either version 2, or (at
X%your option) any later version.
X
X%This texinfo.tex file is distributed in the hope that it will be
X%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
X%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
X%General Public License for more details.
X
X%You should have received a copy of the GNU General Public License
X%along with this texinfo.tex file; see the file COPYING. If not, write
X%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
X%USA.
X
X
X%In other words, you are welcome to use, share and improve this program.
X%You are forbidden to forbid anyone else to use, share and improve
X%what you give them. Help stamp out software-hoarding!
X
X\def\texinfoversion{2.115}
X\message{Loading texinfo package [Version \texinfoversion]:}
X
X% Print the version number if in a .fmt file.
X\everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
X
X% Save some parts of plain tex whose names we will redefine.
X
X\let\ptexlbrace=\{
X\let\ptexrbrace=\}
X\let\ptexdots=\dots
X\let\ptexdot=\.
X\let\ptexstar=\*
X\let\ptexend=\end
X\let\ptexbullet=\bullet
X\let\ptexb=\b
X\let\ptexc=\c
X\let\ptexi=\i
X\let\ptext=\t
X\let\ptexl=\l
X\let\ptexL=\L
X
X\def\tie{\penalty 10000\ } % Save plain tex definition of ~.
X
X\message{Basics,}
X\chardef\other=12
X
X% If this character appears in an error message or help string, it
X% starts a new line in the output.
X\newlinechar = `^^J
X
X% Ignore a token.
X%
X\def\gobble#1{}
X
X\hyphenation{ap-pen-dix}
X\hyphenation{mini-buf-fer mini-buf-fers}
X\hyphenation{eshell}
X
X% Margin to add to right of even pages, to left of odd pages.
X\newdimen \bindingoffset \bindingoffset=0pt
X\newdimen \normaloffset \normaloffset=\hoffset
X\newdimen\pagewidth \newdimen\pageheight
X\pagewidth=\hsize \pageheight=\vsize
X
X% Sometimes it is convenient to have everything in the transcript file
X% and nothing on the terminal. We don't just call \tracingall here,
X% since that produces some useless output on the terminal.
X%
X\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
X\def\loggingall{\tracingcommands2 \tracingstats2
X \tracingpages1 \tracingoutput1 \tracinglostchars1
X \tracingmacros2 \tracingparagraphs1 \tracingrestores1
X \showboxbreadth\maxdimen\showboxdepth\maxdimen
X}%
X
X%---------------------Begin change-----------------------
X%
X%%%% For @cropmarks command.
X% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
X%
X\newdimen\cornerlong \newdimen\cornerthick
X\newdimen \topandbottommargin
X\newdimen \outerhsize \newdimen \outervsize
X\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
X\outerhsize=7in
X%\outervsize=9.5in
X% Alternative @smallbook page size is 9.25in
X\outervsize=9.25in
X\topandbottommargin=.75in
X%
X%---------------------End change-----------------------
X
X% \onepageout takes a vbox as an argument. Note that \pagecontents
X% does insertions itself, but you have to call it yourself.
X\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
X\def\onepageout#1{\hoffset=\normaloffset
X\ifodd\pageno \advance\hoffset by \bindingoffset
X\else \advance\hoffset by -\bindingoffset\fi
X{\escapechar=`\\\relax % makes sure backslash is used in output files.
X\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
X{\let\hsize=\pagewidth \makefootline}}}%
X\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
X
X%%%% For @cropmarks command %%%%
X
X% Here is a modification of the main output routine for Near East Publications
X% This provides right-angle cropmarks at all four corners.
X% The contents of the page are centerlined into the cropmarks,
X% and any desired binding offset is added as an \hskip on either
X% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
X%
X\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
X{\escapechar=`\\\relax % makes sure backslash is used in output files.
X \shipout
X \vbox to \outervsize{\hsize=\outerhsize
X \vbox{\line{\ewtop\hfill\ewtop}}
X \nointerlineskip
X \line{\vbox{\moveleft\cornerthick\nstop}
X \hfill
X \vbox{\moveright\cornerthick\nstop}}
X \vskip \topandbottommargin
X \centerline{\ifodd\pageno\hskip\bindingoffset\fi
X \vbox{
X {\let\hsize=\pagewidth \makeheadline}
X \pagebody{#1}
X {\let\hsize=\pagewidth \makefootline}}
X \ifodd\pageno\else\hskip\bindingoffset\fi}
X \vskip \topandbottommargin plus1fill minus1fill
X \boxmaxdepth\cornerthick
X \line{\vbox{\moveleft\cornerthick\nsbot}
X \hfill
X \vbox{\moveright\cornerthick\nsbot}}
X \nointerlineskip
X \vbox{\line{\ewbot\hfill\ewbot}}
X }}
X \advancepageno
X \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
X%
X% Do @cropmarks to get crop marks
X\def\cropmarks{\let\onepageout=\croppageout }
X
X\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
X{\catcode`\@ =11
X\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
X\dimen@=\dp#1 \unvbox#1
X\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
X\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
X}
X
X%
X% Here are the rules for the cropmarks. Note that they are
X% offset so that the space between them is truly \outerhsize or \outervsize
X% (P. A. MacKay, 12 November, 1986)
X%
X\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
X\def\nstop{\vbox
X {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
X\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
X\def\nsbot{\vbox
X {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
X
X% Parse an argument, then pass it to #1. The argument is the rest of
X% the input line (except we remove a trailing comment). #1 should be a
X% macro which expects an ordinary undelimited TeX argument.
X%
X\def\parsearg#1{%
X \let\next = #1%
X \begingroup
X \obeylines
X \futurelet\temp\parseargx
X}
X
X% If the next token is an obeyed space (from an @example environment or
X% the like), remove it and recurse. Otherwise, we're done.
X\def\parseargx{%
X % \obeyedspace is defined far below, after the definition of \sepspaces.
X \ifx\obeyedspace\temp
X \expandafter\parseargdiscardspace
X \else
X \expandafter\parseargline
X \fi
X}
X
X% Remove a single space (as the delimiter token to the macro call).
X{\obeyspaces %
X \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
X
X{\obeylines %
X \gdef\parseargline#1^^M{%
X \endgroup % End of the group started in \parsearg.
X %
X % First remove any @c comment, then any @comment.
X % Result of each macro is put in \toks0.
X \argremovec #1\c\relax %
X \expandafter\argremovecomment \the\toks0 \comment\relax %
X %
X % Call the caller's macro, saved as \next in \parsearg.
X \expandafter\next\expandafter{\the\toks0}%
X }%
X}
X
X% Since all \c{,omment} does is throw away the argument, we can let TeX
X% do that for us. The \relax here is matched by the \relax in the call
X% in \parseargline; it could be more or less anything, its purpose is
X% just to delimit the argument to the \c.
X\def\argremovec#1\c#2\relax{\toks0 = {#1}}
X\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
X
X% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
X% @end itemize @c foo
X% will have two active spaces as part of the argument with the
X% `itemize'. Here we remove all active spaces from #1, and assign the
X% result to \toks0.
X%
X% This loses if there are any *other* active characters besides spaces
X% in the argument -- _ ^ +, for example -- since they get expanded.
X% Fortunately, Texinfo does not define any such commands. (If it ever
X% does, the catcode of the characters in questionwill have to be changed
X% here.) But this means we cannot call \removeactivespaces as part of
X% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
X% that \parsearg gets might well have any character at all in it.
X%
X\def\removeactivespaces#1{%
X \begingroup
X \ignoreactivespaces
X \edef\temp{#1}%
X \global\toks0 = \expandafter{\temp}%
X \endgroup
X}
X
X% Change the active space to expand to nothing.
X%
X\begingroup
X \obeyspaces
X \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
X\endgroup
X
X
X\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
X
X%% These are used to keep @begin/@end levels from running away
X%% Call \inENV within environments (after a \begingroup)
X\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
X\def\ENVcheck{%
X\ifENV\errmessage{Still within an environment. Type Return to continue.}
X\endgroup\fi} % This is not perfect, but it should reduce lossage
X
X% @begin foo is the same as @foo, for now.
X\newhelp\EMsimple{Type <Return> to continue.}
X
X\outer\def\begin{\parsearg\beginxxx}
X
X\def\beginxxx #1{%
X\expandafter\ifx\csname #1\endcsname\relax
X{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
X\csname #1\endcsname\fi}
X
X% @end foo executes the definition of \Efoo.
X%
X\def\end{\parsearg\endxxx}
X\def\endxxx #1{%
X \removeactivespaces{#1}%
X \edef\endthing{\the\toks0}%
X %
X \expandafter\ifx\csname E\endthing\endcsname\relax
X \expandafter\ifx\csname \endthing\endcsname\relax
X % There's no \foo, i.e., no ``environment'' foo.
X \errhelp = \EMsimple
X \errmessage{Undefined command `@end \endthing'}%
X \else
X \unmatchedenderror\endthing
X \fi
X \else
X % Everything's ok; the right environment has been started.
X \csname E\endthing\endcsname
X \fi
X}
X
X% There is an environment #1, but it hasn't been started. Give an error.
X%
X\def\unmatchedenderror#1{%
X \errhelp = \EMsimple
X \errmessage{This `@end #1' doesn't have a matching `@#1'}%
X}
X
X% Define the control sequence \E#1 to give an unmatched @end error.
X%
X\def\defineunmatchedend#1{%
X \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
X}
X
X
X% Single-spacing is done by various environments (specifically, in
X% \nonfillstart and \quotations).
X\newskip\singlespaceskip \singlespaceskip = \baselineskip
X\def\singlespace{%
X% Why was this kern here? It messes up equalizing space above and below
X% environments. --karl, 6may93
X%{\advance \baselineskip by -\singlespaceskip
X%\kern \baselineskip}%
X\baselineskip=\singlespaceskip
X}
X
X%% Simple single-character @ commands
X
X% @@ prints an @
X% Kludge this until the fonts are right (grr).
X\def\@{{\tt \char '100}}
X
X% This is turned off because it was never documented
X% and you can use @w{...} around a quote to suppress ligatures.
X%% Define @` and @' to be the same as ` and '
X%% but suppressing ligatures.
X%\def\`{{`}}
X%\def\'{{'}}
X
X% Used to generate quoted braces.
X
X\def\mylbrace {{\tt \char '173}}
X\def\myrbrace {{\tt \char '175}}
X\let\{=\mylbrace
X\let\}=\myrbrace
X
X% @: forces normal size whitespace following.
X\def\:{\spacefactor=1000 }
X
X% @* forces a line break.
X\def\*{\hfil\break\hbox{}\ignorespaces}
X
X% @. is an end-of-sentence period.
X\def\.{.\spacefactor=3000 }
X
X% @w prevents a word break. Without the \leavevmode, @w at the
X% beginning of a paragraph, when TeX is still in vertical mode, would
X% produce a whole line of output instead of starting the paragraph.
X\def\w#1{\leavevmode\hbox{#1}}
X
X% @group ... @end group forces ... to be all on one page, by enclosing
X% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
X% to keep its height that of a normal line. According to the rules for
X% \topskip (p.114 of the TeXbook), the glue inserted is
X% max (\topskip - \ht (first item), 0). If that height is large,
X% therefore, no glue is inserted, and the space between the headline and
X% the text is small, which looks bad.
X%
X\def\group{\begingroup
X \ifnum\catcode13=\active \else
X \errhelp = \groupinvalidhelp
X \errmessage{@group invalid in context where filling is enabled}%
X \fi
X %
X % The \vtop we start below produces a box with normal height and large
X % depth; thus, TeX puts \baselineskip glue before it, and (when the
X % next line of text is done) \lineskip glue after it. (See p.82 of
X % the TeXbook.) Thus, space below is not quite equal to space
X % above. But it's pretty close.
X \def\Egroup{%
X \egroup % End the \vtop.
X \endgroup % End the \group.
X }%
X %
X \vtop\bgroup
X % We have to put a strut on the last line in case the @group is in
X % the midst of an example, rather than completely enclosing it.
X % Otherwise, the interline space between the last line of the group
X % and the first line afterwards is too small. But we can't put the
X % strut in \Egroup, since there it would be on a line by itself.
X % Hence this just inserts a strut at the beginning of each line.
X \everypar = {\strut}%
X %
X % Since we have a strut on every line, we don't need any of TeX's
X % normal interline spacing.
X \offinterlineskip
X %
X % OK, but now we have to do something about blank
X % lines in the input in @example-like environments, which normally
X % just turn into \lisppar, which will insert no space now that we've
X % turned off the interline space. Simplest is to make them be an
X % empty paragraph.
X \ifx\par\lisppar
X \edef\par{\leavevmode \par}%
X %
X % Reset ^^M's definition to new definition of \par.
X \obeylines
X \fi
X %
X % We do @comment here in case we are called inside an environment,
X % such as @example, where each end-of-line in the input causes an
X % end-of-line in the output. We don't want the end-of-line after
X % the `@group' to put extra space in the output. Since @group
X % should appear on a line by itself (according to the Texinfo
X % manual), we don't worry about eating any user text.
X \comment
X}
X%
X% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
X% message, so this ends up printing `@group can only ...'.
X%
X\newhelp\groupinvalidhelp{%
Xgroup can only be used in environments such as @example,^^J%
Xwhere each line of input produces a line of output.}
X
X% @need space-in-mils
X% forces a page break if there is not space-in-mils remaining.
X
X\newdimen\mil \mil=0.001in
X
X\def\need{\parsearg\needx}
X
X% Old definition--didn't work.
X%\def\needx #1{\par %
SHAR_EOF
true || echo 'restore of q-1.7/texinfo.tex failed'
fi
echo 'End of part 14'
echo 'File q-1.7/texinfo.tex is continued in part 15'
echo 15 > _shar_seq_.tmp
exit 0