Author: coke Date: Fri Mar 28 19:47:54 2008 New Revision: 26618 Modified: branches/type_ids/docs/book/ch03_pir_basics.pod branches/type_ids/docs/book/ch05_pasm.pod
Log: [docs] minor cleanups to the book elminating some dead syntax. Modified: branches/type_ids/docs/book/ch03_pir_basics.pod ============================================================================== --- branches/type_ids/docs/book/ch03_pir_basics.pod (original) +++ branches/type_ids/docs/book/ch03_pir_basics.pod Fri Mar 28 19:47:54 2008 @@ -224,7 +224,7 @@ new PMC object before you use it. The C<new> instruction creates a new PMC. Unlike PASM, PIR doesn't use a dot in front of the class name. - P0 = new PerlString # same as new P0, .PerlString + P0 = new 'PerlString' # same as new P0, 'PerlString' P0 = "Hello, Polly.\n" print P0 @@ -232,16 +232,14 @@ register C<P0>, assigns the value "Hello, Polly.\n" to it, and prints it. The syntax is exactly the same for temporary register variables: - $P4711 = new PerlString + $P4711 = new 'PerlString' $P4711 = "Hello, Polly.\n" print $P4711 -With named variables the type passed to the C<.local> directive is -either the generic C<pmc> or a type compatible with the type passed to -C<new>: +With named variables the type passed to the C<.local> directive is C<pmc>: - .local PerlString hello # or .local pmc hello - hello = new PerlString + .local pmc hello + hello = new 'PerlString' hello = "Hello, Polly.\n" print hello Modified: branches/type_ids/docs/book/ch05_pasm.pod ============================================================================== --- branches/type_ids/docs/book/ch05_pasm.pod (original) +++ branches/type_ids/docs/book/ch05_pasm.pod Fri Mar 28 19:47:54 2008 @@ -187,7 +187,7 @@ print P1 # prints "Zaphod" end -The C<new> opcode creates an instance of the C<.String> class. The +The C<new> opcode creates an instance of the C<String> class. The class's vtable methods define how the PMC in C<P0> operates. The first C<set> statement calls C<P0>'s vtable method C<set_string_native>, which assigns the string "Ford" to the PMC. When
