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>
We define the following categories. One for all turing symbols. and one for all the blank symbols.
‣ TmSymbol( representation ) | ( operation ) |
Returns: a turing symbol.
This returns a turing symbol when given a character representation.
‣ TmBlank( ) | ( operation ) |
Returns: a turing symbol.
This returns the turing blank symbol.
All blank symbols are identical.
‣ 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"
generated by GAPDoc2HTML