Execute Brain****/Perl: Difference between revisions

m
Fixed syntax highlighting.
m (Categorization now in master page)
m (Fixed syntax highlighting.)
 
(One intermediate revision by one other user not shown)
Line 4:
You can set your own values for the standard nonstandardized behaviors (like the value "," returns on EOF) by changing the variables listed under "Implementation-specific variables". The other nonstandardized aspects of the language are allowed to follow Perl's defaults: for instance, modifying a cell past the forward end of the tape will lengthen it, but going backward from the first cell will wrap around to the final cell. These could be made somewhat more sensible, but doing so would serve little purpose, as this interpreter is meant to serve as a simple example, not an industrial-strength tool.
 
<langsyntaxhighlight lang="perl">#!/usr/bin/perl
 
use strict;
Line 85:
# We simply ignore meaningless characters.
++$cmd;
$cmd < @code or last;}</langsyntaxhighlight>
9,477

edits