[svn:parrot] r41691 - trunk/docs/book/pir
rblasch at svn.parrot.org
rblasch at svn.parrot.org
Sun Oct 4 14:10:11 UTC 2009
Author: rblasch
Date: Sun Oct 4 14:10:08 2009
New Revision: 41691
URL: https://trac.parrot.org/parrot/changeset/41691
Log:
[book] Reverted r41689, committed too much.
Modified:
trunk/docs/book/pir/ch04_variables.pod
trunk/docs/book/pir/ch05_control_structures.pod
trunk/docs/book/pir/ch06_subroutines.pod
trunk/docs/book/pir/ch09_exceptions.pod
Modified: trunk/docs/book/pir/ch04_variables.pod
==============================================================================
--- trunk/docs/book/pir/ch04_variables.pod Sun Oct 4 14:07:06 2009 (r41690)
+++ trunk/docs/book/pir/ch04_variables.pod Sun Oct 4 14:10:08 2009 (r41691)
@@ -160,7 +160,7 @@
X<logical opcodes>
The logical opcodes evaluate the truth of their arguments. They are most
useful to make decisions for control flow. Integers and numeric PMCs
-support logical, are false if they're 0 and true otherwise. Strings are
+support logical are false if they're 0 and true otherwise. Strings are
false if they're the empty string or a single character "0", and true
otherwise. PMCs are true when their C<get_bool>X<get_bool vtable
function> vtable function returns a nonzero value.
Modified: trunk/docs/book/pir/ch05_control_structures.pod
==============================================================================
--- trunk/docs/book/pir/ch05_control_structures.pod Sun Oct 4 14:07:06 2009 (r41690)
+++ trunk/docs/book/pir/ch05_control_structures.pod Sun Oct 4 14:10:08 2009 (r41691)
@@ -298,7 +298,7 @@
...
}
-where C<i> is the counter, C<i = 1> sets the start value, C<< i <= 10 >> checks
+where C<i> is the counter, C<i = 1> sets the start value, C<<i <= 10>> checks
the stop condition, and C<i++> steps to the next iteration. A I<for> loop in
PIR requires one conditional branch and two unconditional branches.
Modified: trunk/docs/book/pir/ch06_subroutines.pod
==============================================================================
--- trunk/docs/book/pir/ch06_subroutines.pod Sun Oct 4 14:07:06 2009 (r41690)
+++ trunk/docs/book/pir/ch06_subroutines.pod Sun Oct 4 14:10:08 2009 (r41691)
@@ -188,7 +188,7 @@
X<named parameters>
Named parameters are an alternative to positional parameters. Instead of
passing parameters by their position in the string, Parrot assigns
-arguments to parameters by their name. Consequently you may pass named
+arguments to parameters by their name. Consequencly you may pass named
parameters in any order. Declare named parameters with with the
C<:named>X<:named parameter modifier> modifier.
@@ -390,7 +390,7 @@
$ parrot args.pir foo bar baz
-... they will be accessible at index 1, 2, and 3 of the PMC parameter.N<Index 0
+... they will be accesible at index 1, 2, and 3 of the PMC parameter.N<Index 0
is unused.>
=begin PIR
@@ -662,7 +662,7 @@
what it knows about lexical variables. Not all subroutines get a C<LexInfo> PMC
by default; subroutines need to indicate to Parrot that they require a
C<LexInfo> PMC. One way to do this is with the C<.lex> directive. Of course,
-the C<.lex> directive only works for languages that know the names of their
+the C<.lex> directive only works for languages that know the names of there
lexical variables at compile time. Languages where this information is not
available can mark the subroutine with C<:lex> instead.
Modified: trunk/docs/book/pir/ch09_exceptions.pod
==============================================================================
--- trunk/docs/book/pir/ch09_exceptions.pod Sun Oct 4 14:07:06 2009 (r41690)
+++ trunk/docs/book/pir/ch09_exceptions.pod Sun Oct 4 14:10:08 2009 (r41691)
@@ -108,14 +108,14 @@
=end PIR_FRAGMENT
-This example creates an exception handler C<my_handler> and then runs a
+This example creates an exception handler C<my_handler> and then runs a a
division operation that will throw a "division by zero" exception if C<$I2> is
0. When C<$I2> is 0, C<div> throws an exception. The exception handler catches
it, prints "caught an exception", and then clears itself with C<pop_eh>. When
C<$I2> is a non-zero value, there is no exception. The code clears the
exception handler with C<pop_eh>, then prints "maybe printed". The C<goto>
skips over the code of the exception handler, as it's just a labeled unit of
-code within the subroutine.
+code within the subruotine.
The exception object provides access to various attributes of the
exception for additional information about what kind of error it was,
More information about the parrot-commits
mailing list