此内容没有您所选择的语言版本。11.16. Rules with Traits Example This example illustrates the trait interface being mapped to a field: when $o: OrderItem( $p : price, $code : custCode ) $c: GoldenCustomer( code == $code, $a : balance, $d: discount ) then $c.setBalance( $a - $p*$d ); end when $o: OrderItem( $p : price, $code : custCode ) $c: GoldenCustomer( code == $code, $a : balance, $d: discount ) then $c.setBalance( $a - $p*$d ); end Copy to Clipboard Copied! Toggle word wrap Toggle overflow Report a bug 前一个下一个