本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 * q% M H q) ~/ v0 Q% g3 e9 O
0 W8 ]# ]1 ~9 O9 O2 c, u: A
下面的程序如何修改可以实现?
$ \# j+ q+ a: Q: ]$ B; _8 N( `C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG2 K: r: {5 D* ]! M, Y7 ]
treenode item = parnode(1);; L& O' d0 ?3 f. G) {
treenode current = ownerobject(c);
! V+ ~/ E1 F1 p' ?/**Conditional Port*/" O: P& t! O0 ~& k' G+ F& u3 I6 v# W
/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
0 T9 J9 l3 ]# D( r7 h/** \nCondition: */ e2 q8 k8 H6 X) R
int condition = /**/1/**/;/** \nPort if Condition is true: */
4 a/ e; G1 p. p5 wint port1 = /**/1/**/;/** \nPort if Condition is false: */
- q9 U; _- J8 ]7 c; ^1 fint port2 = /**/2/**/;
! y9 [0 Q2 A" ~if (condition)! M5 g$ Z+ V3 }* l. d! M H p n7 c
return port1;
; {. ?! Y" n( y4 b+ E; k/ ~6 ?! }& ~
8 @" j: L6 J* R; Ireturn port2; |