| THE META-HTML LANGUAGE REFERENCE MANUAL

| [TOC] |

## Manual Page Viewer

Name: DEFINE-FUNCTION

Section: Macro Commands

Synopsis:

`<define-function NAME [NAMED-PARAMETER...] [PACKAGE=PACKNAME]>
%body
</define-function>`

Description:

Define NAME as a simple tag.

The only differences between `define-function` and `define-tag` are:

1. The whitespace=delete option is assumed.
2. The NAMED-PARAMETERs are evaluated in the context of the caller, not of the definition of the defun.
3. By default, a local package is wrapped around the invocation of the defined function. This can be changed by the use of the PACKAGE=PACKNAME keyword.

    <define-function factorial num>
       <if <lt num 2> 1
          <mul num <factorial <sub num 1>>>>
    </define-function>

    <factorial 5> --> 120

Edit Pointer
Function Index
Variable Index
Variable Editor

The META-HTML Reference Manual V1.4 Copyright © 1995, 1996, Brian J. Fox, 1996, 1997 Universal Access Inc.
Found a bug? Send mail to bug-manual@metahtml.com