Jon- Sunday, July 31, 2005, 5:59:01 AM, you wrote:
J> It has been considered a bug, and flagged for the programmer, in Delphi J> for years. I don't see how it can be considered anything else. Now as J> to whether it is a bug that is reported in Rev with an error message, J> that is a different story. I wasn't aware that Delphi even *had* a "for each" element construct, but then I haven't kept up with Delphi since v6.0 or so. Now that I've googled it, I see that Borland added foreach support to Delphi 2005. The documentation, though, clearly states that the loop indices are provided as read-only references only and cannot be modified. Works the same way in C#, in case you're interested. Since this is a brand-new addition to Delphi, I'm not sure what you're referring to in "has been considered a bug...for years". Nor how this can be considered a bug, since it's clearly documented. Personally, I prefer either the Perl or PHP implementations, where you're free to use and modify the element since it's separate from the loop index. Messing with a loop index is always a Bad Idea. Interestingly, in Perl changing the loop element changes the original referenced element, while in PHP the original value is unchanged. -- -Mark Wieder [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
