本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 : _, L* f8 m) H% ] Z0 d: u
8 _5 T; k3 e1 p% G$ I& @
下面的程序如何修改可以实现?
9 f: ^* a4 u' w% mC:\Documents and Settings\in_qq_wang\桌面\未命名.JPG0 m- v7 V0 I( c
treenode item = parnode(1);
% l, D8 F5 r2 Rtreenode current = ownerobject(c);
( Z @. d8 f, i, R/**Conditional Port*/: s: N. y; H; q9 i4 t0 L
/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
) y! B! I7 ^$ {) `% r/ M5 N$ Y/** \nCondition: */7 r* Z/ M8 J% b( w1 X5 z
int condition = /**/1/**/;/** \nPort if Condition is true: */
" r6 [% @3 F- i1 Wint port1 = /**/1/**/;/** \nPort if Condition is false: */
6 \% r/ P/ C8 q: ]# W& f. k% yint port2 = /**/2/**/;9 A, ?1 w5 ]8 W) N0 q
if (condition)& a: \* m# s6 y- L* g9 m9 K
return port1;9 u/ u# }$ G$ O: P3 [; U
+ Q4 h$ }& P) s! u }, v( d7 n: Qreturn port2; |