本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 6 h+ x+ m# l$ V! d$ m
+ P, O T5 `' L下面的程序如何修改可以实现?
1 [1 l' G V, `& B& QC:\Documents and Settings\in_qq_wang\桌面\未命名.JPG4 X% F: B: i* O. u& F7 ~
treenode item = parnode(1);( h- U4 N- ?8 r- }- }! \/ }
treenode current = ownerobject(c);! I$ R& b4 X5 |5 y7 J* q9 ~( E1 T
/**Conditional Port*/
' o3 \0 `( [5 d! ?/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
; V. |! A4 Q" X+ S8 f: r& ]/** \nCondition: */ ]* K2 d0 m; [. K e& M
int condition = /**/1/**/;/** \nPort if Condition is true: */- P: D, D5 W5 @5 [. v i r' m
int port1 = /**/1/**/;/** \nPort if Condition is false: */9 g# w, ?. w; u% k# ^
int port2 = /**/2/**/;
8 F) k' B/ C2 C6 Cif (condition)8 s9 t8 Y3 @7 r
return port1;
+ l0 B, |9 M" ~+ n5 _
6 m8 @( s( P- U+ X6 Ereturn port2; |