settapecount
Sets the number of tapes for multi-tape variants.
Syntax
settapecount(n);
Parameters
n: A positive integer (1, 2, 3, ...)
Examples
setvariant(multi-tape);
settapecount(2); ### Two-tape machine
setvariant(multi-tape-multi-step);
settapecount(3); ### Three-tape machine
Rules
- Only valid for multi-tape variants:
multi-tapeandmulti-tape-multi-step - Required when using multi-tape variants
- Must be a positive integer
- Must appear before declarations and transitions
- Can only be declared once
Examples by Variant
Not allowed (single-tape):
setvariant(single-tape);
settapecount(2); ### ERROR: 'settapecount' is not valid for variant 'single-tape'
Required (multi-tape):
setvariant(multi-tape);
### ERROR if settapecount is missing: 'setvariant(multi-tape)' requires an explicit 'settapecount'
Correct:
setvariant(multi-tape);
settapecount(2);
Errors
- Invalid number:
tape count must be a positive integer, got 'xyz' - Wrong variant:
'settapecount' is not valid for variant 'single-tape' - Missing for multi-tape:
'setvariant(multi-tape)' requires an explicit 'settapecount' - Duplicate:
duplicate 'settapecount'
See Also
- setvariant - Set the machine variant
- maketransitions - Multi-tape transition syntax