infinite while loop

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
knish
User
Beiträge: 1
Registriert: Freitag 4. Januar 2008, 13:21

Hi,

I have two py programs. both have while 1: loops. Lets say File A has one while 1: loop and File B has another while 1: loop. File A has a break statement. File B has no break statement.


File B is running. I now run File A. This file executes the break statement. What I observe is that the File A loops stops working. correct me if I am wrong. What happens when two different infinite while loops execute one after another. Such that the last while loops breaks. Does this cause the first loop to stop too.


How to encounter such issue.


BRgds,

kNish
Mad-Marty
User
Beiträge: 317
Registriert: Mittwoch 18. Januar 2006, 19:46

only the innermost loop breaks.
the others will run forever without a break or stop condition.
BlackJack

@knish: I don't understand the problem at all. You are not running files, you are running at most one python program. If you you really start both modules independent then both loops are completely independent.

Please provide actual code, tell what you expect it to do, and what you get instead.
Antworten