我正在读取标准输入(一个文本文件并使用这样排列的数据进行计算:
2 --This states the amount of following sets of info
150 -- this is the first set of data
250 -- this is the second set of data
0 -- this is supposed to tell my program that this is the end of the two sets but
keep looping because there might be multiple sets in here, seperated by "0"'s.
我的 ADA 计划的基本大纲:
procedure test is
begin
while not end_of_file loop
......//my whole program executes
end loop;
end test;
我想知道如何告诉我的程序继续循环,直到没有什么可读的,但要记住零是分开数据集的,如果每个“0”之后有更多数据,则继续循环。