Goto Chapter: Top 1 2 3 4 5 6 7 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Symbol
 2.1 Categories
 2.2 Constructor
 2.3 Representation

2 Symbol

Symbols are used to store information on the Tape. It is akin to a character, which is used in its constructor.

gap> LoadPackage("turing");;
gap> symbolI := TmSymbol('I');
<symbol 'I'>
gap> symbolL := TmSymbol('L');
<symbol 'L'>
gap> symbolI = symbolL;
false

There is a special symbol blank.

gap> LoadPackage("turing");;
gap> TmBlank();
<symbol blank>

2.1 Categories

We define the following categories. One for all turing symbols. and one for all the blank symbols.

2.2 Constructor

2.2-1 TmSymbol
‣ TmSymbol( representation )( operation )

Returns: a turing symbol.

This returns a turing symbol when given a character representation.

2.2-2 TmBlank
‣ TmBlank( )( operation )

Returns: a turing symbol.

This returns the turing blank symbol.

All blank symbols are identical.

2.3 Representation

2.3-1 TmSymbolRepresentation
‣ TmSymbolRepresentation( symbol )( operation )

Returns: a string representing the symbol

each symbol needs a representation that can be printed. This operation returns that representation.

gap> LoadPackage("turing");;
gap> symbol := TmSymbol('I');;
gap> TmSymbolRepresentation(symbol);
"I"
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 Ind

generated by GAPDoc2HTML