本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑
, m, p8 ~4 m( J) p
' }# Z9 B4 o: y$ u$ v x! G. o下面的程序如何修改可以实现?, v: z/ U& K4 T& a3 b; [; ^* p& t
C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG
( r6 }$ G7 R! b, V: Ntreenode item = parnode(1);/ C( b# d1 F1 f
treenode current = ownerobject(c);" ^* A0 F& P, z0 C' q
/**Conditional Port*/) p7 v! m9 K6 m1 x, r1 K
/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
+ F |1 h7 v3 R" {; e/** \nCondition: */
$ q/ {5 l. m7 A h0 Mint condition = /**/1/**/;/** \nPort if Condition is true: */( c) I" y7 q( y: s' q. J& A, a
int port1 = /**/1/**/;/** \nPort if Condition is false: */
& Y/ _ e7 I D* R) zint port2 = /**/2/**/;
; f* D9 I [: a. Q% B* m) I: K1 K" |if (condition)* T& L9 k6 g# |4 _* h
return port1;. V" W" Z* S8 N B4 m) C/ o
! F; q1 N. m* p& Qreturn port2; |