patternModerate
What was the first programming language with loop break?
Viewed 0 times
thewhatwithprogramminglooplanguagefirstwasbreak
Problem
While tracing the history of the BREAK and CONTINUE statements found in popular languages, I ran into a dead end right around ALGOL.
Algol _? -> CPL -> BCPL -> C -> C++ -> Java -> JavaScript
What was the first programming language to introduce the feature of being able to break out of a loop from the body?
This feature existed in BCPL and is implied to have existed (from its manual) in CPL which was introduced in 1963.
ALGOL 60 was CPL's main influence, but ALGOL 60 did not have the feature.
The structured programming movement started around 1966.
Given the turmoil in the committee between ALGOL 60 and ALGOL 68 (which spawned many languages), was this the source of the feature? Did it exist under a different form at the time as a block EXIT perhaps?
Algol _? -> CPL -> BCPL -> C -> C++ -> Java -> JavaScript
What was the first programming language to introduce the feature of being able to break out of a loop from the body?
This feature existed in BCPL and is implied to have existed (from its manual) in CPL which was introduced in 1963.
ALGOL 60 was CPL's main influence, but ALGOL 60 did not have the feature.
The structured programming movement started around 1966.
Given the turmoil in the committee between ALGOL 60 and ALGOL 68 (which spawned many languages), was this the source of the feature? Did it exist under a different form at the time as a block EXIT perhaps?
Solution
I sent an email to Martin Richards to try and get some details/context about CPL and he gave me a reply. To partially quote:
"CPL did have a break command to cause an exit from a repetitive command such as while or until. As far as I remember it did not have an equivalent of continue, but the equivalent loop command was added to BCPL early in 1967."
[...]
"The introduction of break in CPL was almost certainly influenced by Dijkstra's paper..."
He also pointed me to the following document (see page 5):
http://www.cl.cam.ac.uk/~mr10/cpl2bcpl.pdf
"CPL did have a break command to cause an exit from a repetitive command such as while or until. As far as I remember it did not have an equivalent of continue, but the equivalent loop command was added to BCPL early in 1967."
[...]
"The introduction of break in CPL was almost certainly influenced by Dijkstra's paper..."
He also pointed me to the following document (see page 5):
http://www.cl.cam.ac.uk/~mr10/cpl2bcpl.pdf
Context
StackExchange Computer Science Q#51952, answer score: 10
Revisions (0)
No revisions yet.