That's the answer from one of my workmates: That's a workaround for one of the more braindead shortcomings of Microsoft Visual C++ 6. In ISO/ANSI C++, if you declare a loop variable inside a for-statement, that variable goes out of scope at the end of the loop, i.e. you can do this: for ( int i = 0; i < x; ++i ) { // Code } for ( int i = 0; i < y; ++i ) { // Code }
MSVC 6 chokes on this - "variable redefinition". The macro you see is a workaround for this, "forcing" the loop variable into the else-scope (which MSVC 6 handles correctly).
MrMarco
Posts
-
What "for" ? -
Null != NULL in some cases in asp ;)At the moment i'm banging my head at the wall. I'm thinking about deleting this piece of source and write it from scratch. But thanks for the link. If i ever get the permission to redesign the complete application, the first thing i will do is switching from ASP to something other. At the moment i prefer C#.
-
Null != NULL in some cases in asp ;)A few days ago, i have to update our prelife server with the new code. The code itself was written in asp (not asp.net) and developed month ago. After updating and running some manual tests, we decided that this code works fine. But we missed something very important... Take a look in this code and think about what happend, after strSQL gets the value Null (database NULL)...
Function SafeSQLString2(byval strSql) if len(strSQL) > 0 then strSql = Replace(strSql, "'", "") end if SafeSQLString2 = strSql end function
The workmate who wrote this code isn't available anymore. At the moment i'm rewriting the complete code and removing all of this trash.