Table of Contents

Enum Type

An Enum value selects one option from a fixed, named set of choices. Unlike Cell Type or Log Tag Type, which each have exactly one set of options shared by every port of that type, Enum Type is backed by a registry of separately named enum definitions — such as ComputingTargetEnum or EnvironmentKeyEnum — each one a list of dot-constant/label pairs. A given port declares which named definition it uses, so two different Enum Type ports can accept entirely different sets of options depending on which definition they reference.

Some examples, spanning several unrelated functors:

Like any other type, an Enum Type port can also be nullable: Run Remotely's networkErrorBehavior offers .abortExecution (0) and .runLocally (1), but defaults to .none rather than to either option, falling back to the application's own setting when left unspecified.

GUI Editor

Invalid Link
Graphical representation of the enum editor

The enum editor presents a dropdown listing the port's own named enum definition. This is the same dropdown experience light enum recreates for the integer-family value types — light enum exists precisely for ports that need this presentation without actually being Enum Type underneath.

EGO Script

An Enum constant uses the same dot-constant syntax as any other type — see Constants — but which dot-constants a given port accepts depends entirely on the named enum definition that port references, not on any single, universal list:

elevation := LoadMap {
    filename = "c:/data/elevation.tif",
    storageMode = .preferMemory
};

Automatic Conversions

See Type System for the complete conversion reference across all types.