Introduction

This page details the workings of variables in Scythe expressions.

Basics

Variables are identified by a preceeding $ , e.g. $name . Names can consist of A-Z, 0-9, dash and underscore. There is no requirement to start the name with a letter. Names are case sensitive.

Values

Variables are not limited to holding values in the traditional sense, they actually hold expressions. So the following are all valid:

Delayed evaluation

Unlike in traditional programming languages, variables only take a value at the time they are used. Consider the following pseudo-code:

$a = 10
$b = $a
$a = 12
print $b

The output from this code is 12, not 10. $b has been set to hold whatever the value of $a is. At the time we evaluated $b , $a holds the value 12 hence so does $b .

Common variables

Common variables are defined by Scythe when considering a mail message. You should avoid defining variables with these names.

Addresses

Mail headers that hold email addresses form entries in 4 variables whose names that the form $aaa-bbb . aaa refers to the mail header and bbb is a key for a component of the address. Consider the following header:

To: "Duncan Martin" <duncan@brown.cow>

This will cause the creation of the following values:

The values are all lists so for a particular mail $to-address , for example, may hold multiple addresses.

The possible values of aaa are:

Other