Those are not conditions; they are just assignments. The condition is just the beg != end bit. A for loop requires a single statement for the initial part, so a comma was used to combine the two variable declarations and assignments into one statement.
If you are confused about the methods used to generate the values, I would look them up on a reference site and see if that helps, then ask if you have questions about what you find.