On 15/06/2019 05:53, mhysnm1...@gmail.com wrote:

> In C, Perl and other languages. 

As a point of interest not all languages have these constructs.
Oberon, for example, only has a while loop because it can be
used to simulate all other loop types. Some Lisp dialects
don't even have a loop construct because recursion can be
used instead.

In addition to for, while and repeat/until some languages
(eg ADA and some BASICs) include a general loop construct.

And of course in assembler GOTO is the ultimate loop construct.

Don;t assume that just because one language supports a
particular construct that others will or should also support
it. The variety of control structures offered is one of the
defining features of any programming language.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to