
Qt → Qt/C++ - Tutorial 079. foreach vs range-based for in C++11?
Qt has its own keyword foreach to iterate through the elements of the containers. This keyword was introduced before the C++11 standard and is a macro. At this point in the C++11 standard, there are range-based for loops that perform the same functionality as foreach .
But in both cases there are nuances. Let's figure it out.

C++ → C++ - Tutorial 004. Tests and loops
C++, while, for, do, break, continue, if, else
C++ provides a standard set of operators for selecting a selection and cycles.
The keywords related to the construction of branching conditions for the code are:
- if
- else
- switch
- case
- break
- default
The key words relating to the construction of cycles are:
- do
- while
- break
- continue
- for

Ruby → User Guide #08 - Ruby - control structures
case, for, Ruby, ruby lesson, ruby уроки, user guide, while, руководство пользователя
This chapter explores more of ruby's control structures.
case
We use the case statement to test a sequence of conditions. This is superficially similar to switch in C and Java but is considerably more powerful, as we shall see.
ruby> i=8 ruby> case i | when 1, 2..5 | print "1..5\n" | when 6..10 | print "6..10\n" | end 6..10 nil
Timeweb
Let me recommend you the excellent hosting on which EVILEG is located.
For many years, Timeweb has been proving his stability.
For projects on Django I recommend VDS hosting
View Hosting