Acme-Turing
view release on metacpan or search on metacpan
=item B<print_tape> L R
Prints part of the current contents of the tape: the symbol under
the read/write head, L symbols to the left of it, and R symbols
to the right. Both L and R default to 2.
=back
=head1 EXAMPLE
The following example computes the logical OR of two symbols.
use Acme::Turing;
$m1 = Acme::Turing->new();
$m1->init_tape(100, '0', '1');
$m1->add_spec('START:0', "R:MAYBE");
$m1->add_spec('START:1', "R:IGNORE");
$m1->add_spec('MAYBE:1', "R, Ptrue:STOP");
$m1->add_spec('MAYBE:0', "R,Pfalse, R:STOP");
$m1->add_spec('IGNORE:ANY', "R,Ptrue:STOP");
$m1->run();
( run in 0.726 second using v1.01-cache-2.11-cpan-49f99fa48dc )