本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 B" M; l' j. U# j
. a8 A) P4 J/ s$ x) x; N
下面的程序如何修改可以实现?3 p' R- F3 w. L" h5 y7 h
C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG7 U; o+ Y8 K' M) m3 p, a
treenode item = parnode(1);8 Y8 |' ^+ G, |, M, f: z5 c! @1 \* `; F
treenode current = ownerobject(c);
% s" [+ u+ w8 i" ]/**Conditional Port*/3 F6 K X+ E/ X g* K0 d$ O& N
/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/$ n7 u0 q L* w" _; d6 D' q
/** \nCondition: */' G. b0 |% h& {0 i5 J5 V
int condition = /**/1/**/;/** \nPort if Condition is true: */4 t: u- N! c' S8 O1 {: {) x
int port1 = /**/1/**/;/** \nPort if Condition is false: */6 ?6 i1 z: Q L2 q) k: d
int port2 = /**/2/**/;! n* R9 Z1 Q$ K: z& T6 x
if (condition)
0 d! _' d! }' ~& m K2 F$ b: _, y return port1;+ [8 R% F, j7 h6 B
% z C) a) i5 I
return port2; |