func init if(linked("Result") and linked("doInsert")) sys.add_var_extern(this.name, 2) end end func make(srcstr, position, substr) return('(' && d("SrcStr") && ').Insert(' && d("Position") && ',' && d("SubStr") && ')') end func doInsert(srcstr, position, substr) if(linked("Result")) blk.println(this.codename, ' = ', make(srcstr, position, substr), ';') event("onInsert", this.codename) else event("onInsert", make(srcstr, position, substr)) end end func Result if(linked("doInsert")) return(this.codename) else return(make()) end end