[svn:parrot] r46105 - in trunk/examples/pir: . befunge

jimmy at svn.parrot.org jimmy at svn.parrot.org
Wed Apr 28 05:59:11 UTC 2010


Author: jimmy
Date: Wed Apr 28 05:59:10 2010
New Revision: 46105
URL: https://trac.parrot.org/parrot/changeset/46105

Log:
replace/modify in-place string ops

Modified:
   trunk/examples/pir/befunge/debug.pir
   trunk/examples/pir/befunge/io.pir
   trunk/examples/pir/befunge/load.pir
   trunk/examples/pir/substr.pir

Modified: trunk/examples/pir/befunge/debug.pir
==============================================================================
--- trunk/examples/pir/befunge/debug.pir	Wed Apr 28 05:36:19 2010	(r46104)
+++ trunk/examples/pir/befunge/debug.pir	Wed Apr 28 05:59:10 2010	(r46105)
@@ -181,7 +181,7 @@
     print "bef> "
     $P0 = getstdin
     $S0 = readline $P0
-    chopn $S0, 1
+    $S0 = chopn $S0, 1
     $I0 = length $S0
 
     if $I0 == 0 goto DEBUG__INTERACT__NEXT

Modified: trunk/examples/pir/befunge/io.pir
==============================================================================
--- trunk/examples/pir/befunge/io.pir	Wed Apr 28 05:36:19 2010	(r46104)
+++ trunk/examples/pir/befunge/io.pir	Wed Apr 28 05:59:10 2010	(r46105)
@@ -41,7 +41,7 @@
 
     $P1 = getstdin
     $S0 = readline $P1
-    chopn $S0, 1
+    $S0 = chopn $S0, 1
 
   _IO__INPUT_CHAR__SUBSTR:
     $S1 = replace $S0, 0, 1, ""
@@ -73,7 +73,7 @@
 
     $P1 = getstdin
     $S0 = readline $P1
-    chopn $S0, 1
+    $S0 = chopn $S0, 1
     len = length $S0
 
   _IO__INPUT_INT__PARSE_INPUT:

Modified: trunk/examples/pir/befunge/load.pir
==============================================================================
--- trunk/examples/pir/befunge/load.pir	Wed Apr 28 05:36:19 2010	(r46104)
+++ trunk/examples/pir/befunge/load.pir	Wed Apr 28 05:59:10 2010	(r46105)
@@ -34,7 +34,7 @@
 
     newline = index line, "\n"
     if newline < 0 goto LOAD__SKIP_CHOP
-    chopn line, 1
+    line = chopn line, 1
     LOAD__SKIP_CHOP:
     line     = _load__fit_str_to_80(line)
     playline = _load__str_to_array(line)

Modified: trunk/examples/pir/substr.pir
==============================================================================
--- trunk/examples/pir/substr.pir	Wed Apr 28 05:36:19 2010	(r46104)
+++ trunk/examples/pir/substr.pir	Wed Apr 28 05:59:10 2010	(r46105)
@@ -31,7 +31,7 @@
 WANE:   $I1 = length $S1
         print  $S1
         print  "\n"
-        chopn  $S1, $S1, 1
+        $S1 = chopn $S1, 1
         unless $I1 == $I3 goto WANE
 DONE:
 .end


More information about the parrot-commits mailing list