×

Loading...
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!

这个错误比较典型. "There is a bug in the Microsoft ASP.NET standard library. "

function WebForm_CallbackComplete()
{
 for (i = 0; i < __pendingCallbacks.length; i++)
  {。。。}
}
It seems that the error is in the for (i=0; and is the core of the problem. The i variable is a global variable and it can get changed within the loop.
Report

Replies, comments and Discussions:

  • 工作学习 / 科技领域杂谈 / 请C++ 高手指点一下,为什么 i, j, k 就不是好的变量名? 学过数学的人应该记得 i, j, k 被广泛地用做为 下标,而且一目了然。
    • 不要迷信高手,要用自己的脑子想。i,j,k 做循环变量,没什么不好。俺看到这样的程序时,总是想踢作者一脚: for (int employeeIndex = 0; employeeIndex < numberOfEmployees; employeeIndex++) ...
      • 他那是写给他的manager 看的。
        • 很多时候是公司规定。比如我会写int nIndex = 0;.... 总之,程序是给人看的,只要看的人要我这么写,我就一定不折不扣地执行。绝对不会自说自话。
      • if it s long code in loop, i, j, k is not good to use; less than 20 lines, ijk is more convient
      • 他是按字数算钱的五毛
    • 这个错误比较典型. "There is a bug in the Microsoft ASP.NET standard library. "
      function WebForm_CallbackComplete()
      {
       for (i = 0; i < __pendingCallbacks.length; i++)
        {。。。}
      }
      It seems that the error is in the for (i=0; and is the core of the problem. The i variable is a global variable and it can get changed within the loop.
      • 解决方案是先定义变量然后再引用, vb.net 也一样。