Ticket #1116: ch05_page47.patch
File ch05_page47.patch, 1.3 KB (added by jkeenan, 12 years ago) |
---|
-
docs/book/pir/ch05_control_structures.pod
17 17 X<unconditional branch> 18 18 An unconditional branch always jumps to a specified label. PIR has only 19 19 one unconditional branch instruction, C<goto>. In this example, the 20 first C< print> statement never runs because the C<goto> always skips20 first C<say> statement never runs because the C<goto> always skips 21 21 over it to the label C<skip_all_that>: 22 22 23 23 =begin PIR_FRAGMENT -
docs/book/pir/ch04_variables.pod
160 160 X<logical opcodes> 161 161 The logical opcodes evaluate the truth of their arguments. They are most 162 162 useful to make decisions for control flow. Integers and numeric PMCs 163 support logicalare false if they're 0 and true otherwise. Strings are163 are false if they're 0 and true otherwise. Strings are 164 164 false if they're the empty string or a single character "0", and true 165 165 otherwise. PMCs are true when their C<get_bool>X<get_bool vtable 166 166 function> vtable function returns a nonzero value.