Ticket #1116: ch04_page16.patch

File ch04_page16.patch, 0.7 KB (added by jkeenan, 12 years ago)

Page 16 Logical and Bitwise Operators section

  • docs/book/pir/ch04_variables.pod

     
    160160X<logical opcodes> 
    161161The logical opcodes evaluate the truth of their arguments.  They are most 
    162162useful to make decisions for control flow.  Integers and numeric PMCs 
    163 support logical are false if they're 0 and true otherwise. Strings are 
     163are false if they're 0 and true otherwise. Strings are 
    164164false if they're the empty string or a single character "0", and true 
    165165otherwise. PMCs are true when their C<get_bool>X<get_bool vtable 
    166166function> vtable function returns a nonzero value.