没有创建海龟,你的程序count_glucose是glucose_mass的累积总和,这是你文件中输出的内容。但是你的问题表明你认为这是报告葡萄糖药物的数量。
to count_glucose set total_glucose (total_glucose + sum [glucose_mass] of glucose) end
如果你真的想要计算葡萄糖因子,那么你想要 count glucose
count glucose
file-print count glucose
代替:
file-print total_glucose