func init // adds using namespace sys.add_use('System') // initialize instance if(linked("Result") and linked("doTruncate")) sys.add_var(this.name, 'dynamic') end // initialize type of the number this.type = (this.props("Type").value) ? 108 : 7 end func doTruncate(value) if(linked('Result')) blk.println(this.codename, ' = ', this.make_result(value), ';') event('onResult', sub(this.codename, this.type)) else event('onResult', this.make_result(value)) end end func make_result(value) res = 'Math.Truncate(' + sys.to_type(d("Value"), this.type) + ')' return(sub(res, this.type)) end func Result if(linked("doTruncate")) return(sub(this.codename, this.type)) else return(make_result()) end end