本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑
& X5 {: d% X. o# t0 s& g0 ?* Y1 j! X t. R7 h
下面的程序如何修改可以实现?2 X# r5 L( ] C8 D
C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG8 H, S7 |* V3 z8 K. E4 c6 p; ~
treenode item = parnode(1);
& T1 ?# Q: b) \- Qtreenode current = ownerobject(c);
" R' U+ p- N% u% A9 `/**Conditional Port*/
s- P) F) ^* c, W Q a/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
" e7 B; Y4 \# g" m% ~1 q- g: j4 c/** \nCondition: */4 p) f9 Y' T2 C
int condition = /**/1/**/;/** \nPort if Condition is true: */
8 X7 a) `9 \7 T w8 Cint port1 = /**/1/**/;/** \nPort if Condition is false: */) ], d; t( i- U1 ^3 `4 ^; Q
int port2 = /**/2/**/;
: A- G% {$ B0 H9 Q/ E. qif (condition)6 c/ k# V( b1 g) f- P! F! L6 ]* `
return port1;" H" |* m0 l) x; ~, A/ y
; T, ^" x% c1 V9 n* J2 c3 v! treturn port2; |