Alternativer Lösungsvorschlag: Code: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. +++++++++++++++++++++++++++++. +++++++. . +++. -------------------------------------------------------------------------------. +++++++++++++++++++++++++++++++++++++++++++++++++++++++. ++++++++++++++++++++++++. +++. ------. --------. -------------------------------------------------------------------. Erzeugt mit folgendem selbstgeschriebenen Script: PHP-Code: <?php $str = $argv[1]; $c = 0; // current char $n = 0; // next char $pos = 0; for($pos = 0; $pos < strlen($str); $pos++) { $n = ord(substr($str, $pos, 1)); if($c < $n) { for(; $c < $n; $c++) { echo '+'; } } elseif($c > $n) { for(; $c > $n; $c--) { echo '-'; } } echo '.'; } ?>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. +++++++++++++++++++++++++++++. +++++++. . +++. -------------------------------------------------------------------------------. +++++++++++++++++++++++++++++++++++++++++++++++++++++++. ++++++++++++++++++++++++. +++. ------. --------. -------------------------------------------------------------------.
<?php $str = $argv[1]; $c = 0; // current char $n = 0; // next char $pos = 0; for($pos = 0; $pos < strlen($str); $pos++) { $n = ord(substr($str, $pos, 1)); if($c < $n) { for(; $c < $n; $c++) { echo '+'; } } elseif($c > $n) { for(; $c > $n; $c--) { echo '-'; } } echo '.'; } ?>
--
Foren-Regeln