Basic opcodes (PASM)
set $I0, 42 set $N3, 3.14159 set $I1, $I0 set $I2, $N3 set $S0, "Ford" add $I0, $I1 add $N0, $N11, $N13 sub $N0, $N1, 1.5 set $S0, "ab" concat $S0, "cd" length $I0, $S0 print $I0 print "\n" substr $S1, $S0, 1, 2, "xyz"
Parrot | Parrot Compiler Toolkit | #10 |
set $I0, 42 set $N3, 3.14159 set $I1, $I0 set $I2, $N3 set $S0, "Ford" add $I0, $I1 add $N0, $N11, $N13 sub $N0, $N1, 1.5 set $S0, "ab" concat $S0, "cd" length $I0, $S0 print $I0 print "\n" substr $S1, $S0, 1, 2, "xyz"
Copyright © 2008 Patrick Michaud http://www.pmichaud.com/2008/pres/ |