本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 % E/ ^7 r& j, F; [( B
5 H9 Q' P/ A8 P下面的程序如何修改可以实现?9 f) B7 \) P6 S: [+ n& t
C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG
* N R' q& \$ C+ ]# Itreenode item = parnode(1);6 f, v- c1 I/ U& B1 k
treenode current = ownerobject(c);! i$ x. @8 F) u- ^, D4 }# `# R/ H
/**Conditional Port*/
# n/ D; } T5 I. x: w) b/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/7 @7 K6 C, T" s8 Q! R: R' f
/** \nCondition: */
" X4 g! m0 Z9 `int condition = /**/1/**/;/** \nPort if Condition is true: */
4 E# N! O& [3 `! |+ _/ {int port1 = /**/1/**/;/** \nPort if Condition is false: */! e9 y; x8 [2 l4 p4 v
int port2 = /**/2/**/;! w2 d8 S7 {: C1 L+ G {( u
if (condition)9 M8 T4 e/ t) U( O; `
return port1;
% W' O4 P, m0 O0 e) h9 \
+ e) n5 j! a. p" {1 E7 \; L9 Vreturn port2; |