Changes between Version 12 and Version 13 of Migrating to NQPrx

Show
Ignore:
Timestamp:
02/20/10 11:04:37 (4 years ago)
Author:
Austin_Hastings
Comment:

Added note about integer indexing

Legend:

Unmodified
Added
Removed
Modified
  • Migrating to NQPrx

    v12 v13  
    3838 
    3939I noticed a bug in `our` variable vivification (#1308). In essence, a sub referencing a global variable does not have viv code inserted, so the global had better be defined on entry, or you need to use the pir::opcodes to check it, or you need to be doing a blind initialization. 
     40 
     41=== Indexes are using integers === 
     42 
     43As of this writing (20 Feb 2010), I have seen [] index notation coerce pmcs into integers: 
     44{{{ 
     45    find_lex $P81, "$key" 
     46    set $I82, $P81 
     47    getinterp $P83 
     48    set $P84, $P83[$I82] 
     49}}} 
     50 
     51Using a non-integer-indexed PMC type (anything with a Key, for instance) now should use {} indexing. 
     52 
     53