Anonymous user
Search a list: Difference between revisions
m
→[[#ALGOL 68]] Using a FORMAT "value error" exception: move the needles
m (→[[#ALGOL 68]]: add FOR loop version with no exception) |
m (→[[#ALGOL 68]] Using a FORMAT "value error" exception: move the needles) |
||
Line 56:
===Using a FORMAT "value error" exception===
FORMAT hay stack := $c("Zig","Zag","Wally","Ronald","Bush","Krusty","Charlie","Bush","Bozo")$;
[]STRING needles = ("Washington","Bush");▼
FILE needle exception; STRING ref needle;
Line 69 ⟶ 67:
);
▲ []STRING needles = ("Washington","Bush");
FOR i TO UPB needles DO
STRING needle := needles[i];
Line 83 ⟶ 82:
5 Bush
</pre>
===Using a manual FOR loop with no exception===
[]STRING hay stack = ("Zig","Zag","Wally","Ronald","Bush","Krusty","Charlie","Bush","Bozo");
|