Module Variables and Constants

Dylan supports module-level variables, which serve roughly the same purpose as C's global variables. Although the let function may only be used within methods (Dylan-speak for regular functions), the forms define variable and define constant may be used at the top level.

define variable *x* :: <integer> = 3;
define variable *y* = 4;
define constant $hi = "Hi!";

Note that there's not much point in declaring types for constants. Any remotely decent compiler will be able to figure that information out on its own.