A Comparison of Multilevel break and next Statements
- 1 July 1979
- journal article
- Published by Association for Computing Machinery (ACM) in Journal of the ACM
- Vol. 26 (3), 555-566
- https://doi.org/10.1145/322139.322151
Abstract
A study IS made of the descriptive power of if then else statements and repeat (do forever) statements, multilevel break statements (which cause a jump out of an enclosing repeat), and multilevel next statements (which cause a jump to an iteration of an enclosing repeat) Ledgard and Marcotty conjectured that multilevel next statements could be removed without increasing the number of levels of break statements to obtain another program with operations executed in the same order The conjecture is shown to be true for one level of next statement but false for next statements with level greater than l It is also shown that next statements are weaker than break statements in the sense that n levels of next statements can be transformed into 2n levels of break statement, while there is no functionf such that n levels of break can be replaced by f(n) levels of nextKeywords
This publication has 8 references indexed in Scilit:
- An Algorithm for Structuring FlowgraphsJournal of the ACM, 1977
- A genealogy of control structuresCommunications of the ACM, 1975
- On the capabilities of while, repeat, and exit statementsCommunications of the ACM, 1973
- The Expression of Algorithms by ChartsJournal of the ACM, 1972
- Notes on avoiding “go to” statementsInformation Processing Letters, 1971
- Letters to the editor: go to statement considered harmfulCommunications of the ACM, 1968
- Böhm and Jacopini's reduction of flow chartsCommunications of the ACM, 1967
- Flow diagrams, turing machines and languages with only two formation rulesCommunications of the ACM, 1966