# &set(4)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

&set - In-line macro variable assignment

## SYNOPSIS

&set <var> <expr>

## DESCRIPTION

&set performs an in-line macro variable assignment assigning a variable <var> the value of the expression <expr>, returning the evaluated result to the caller. <expr> may be numeric, boolean or a string expression.

&set is typically used for defining (and simultaneously using) indices e.g. as with add-color(2) or add-color-scheme(2). This is a short-hand of set-variable(2).

## EXAMPLE

The following example uses&set to define new colors (see `color.emf`):

    ; Standard colors
    add-color &set %white     0 200 200 200
    add-color &set %black     1 0   0   0
    add-color &set %red       2 200 0   0
    add-color &set %green     3 0   200 0
    add-color &set %yellow    4 200 200 0
    add-color &set %blue      5 0   0   200
    add-color &set %magenta   6 200 0   200
    add-color &set %cyan      7 0   200 200

## SEE ALSO

Variable Functions, &inc(4), set-variable(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>