symbol

symbol — constructs a symbol from a string.

Syntax

symbol (string)

		

Arguments

string

A string.

Returns

A symbol.

Description

This function constructs a symbol whose name is the same as the string, and places that symbol into the symbol table. Subsequent calls to this function with the same string will result in the same symbol, preserving the uniqueness of the symbol. Special characters may be included in the symbol name.

Example

Gamma> symbol("Strange symbol");
Strange\ symbol
Gamma> Strange\ symbol;
5
Gamma> symbol(string("item",2+3));
item5
Gamma>