for (int i = 0; i < outputExpressions.length; i++) {
final OutputExpression outputExpression = outputExpressions[i];
final Expression[] expressions = outputExpression.getExpressions();
final Expression repeatExpr = outputExpression.getRepeatExpr();
final OutputChannel channel = ((OutputPort) (outputPortMap
.get(outputExpression.getPortname()))).getChannel(0);
// FIXME: handle multiports
if (repeatExpr != null) {
int repeatValue = context.intValue(eval.evaluate(repeatExpr));
List[] lists = new List[expressions.length];
for (int j = 0; j < lists.length; j++) {
lists[j] = context.getList(eval.evaluate(expressions[j]));
}
for (int j = 0; j < repeatValue; j++) {
for (int k = 0; k < expressions.length; k++) {
channel.put(lists[k].get(j));
}
}
} else {
for (int j = 0; j < expressions.length; j++) {
channel.put(eval.evaluate(expressions[j]));
}
}
}
}