Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7075) break and continue in iterators
Home

[Freeciv-Dev] Re: (PR#7075) break and continue in iterators

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#7075) break and continue in iterators
From: "Arnstein Lindgard" <a-l@xxxxxxx>
Date: Fri, 9 Jan 2004 09:30:10 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7075 >

Add a warning to the doc which lead me to believe "break" is safe in
all macros. It's the only doc file that mentions "break".


Arnstein

--- doc/HACKING Fri Jan  9 09:14:55 2004
+++ doc/HACKING.new     Fri Jan  9 18:23:06 2004
@@ -120,7 +120,8 @@
 There are other operations than iterating that can be performed on a list;
 inserting, deleting, sorting etc. See common/speclist.h
 Note that the way the *_list_iterate macro is implemented means you can use
-"continue" and "break" in the usual manner.
+"continue" and "break" in the usual manner. Other macros may still be using
+double loops, and in those cases "break" can produce unpredictable results.
 
 One thing you should keep in the back of your mind: Say you are iterating
 through a unit list, and then somewhere inside the iteration decide to

[Prev in Thread] Current Thread [Next in Thread]