A few days ago, I saw a post on csdn titled code written by Japanese programmers and Chinese programmers for the same function.ProgramWritten by MembersCodeHow clear and clear is the poor code written by Chinese programmers.
The code written by "Japanese programmer" is as follows:
Dim griditemindex as integer 'comment
Dim currentpageindex as integer 'comment
Dim pagesize as integer 'comment
Griditemindex = E. Item. itemindex
Currentpageindex = meisaiichiran. currentpageindex
Pagesize = meisaiichiran. pagesize
Dim updatedatarowindex as integer 'comment
Updatedatarowindex = (currentpageindex * pagesize) + griditemindex
DT. Rows (updatedatarowindex). Item (T. bindfldname) = txt
The code written by Chinese programmers is as follows:
DT. Rows (. currentpageindex *. pagesize + E. Item. itemindex). Item (T. bindfldname) = txt
Next, let me express my point of view: first, let alone the authenticity of the post content. I think the code written by the "Chinese programmer" Below is much clearer and clearer than the code written by the "Japanese programmer" above, the code of the above "Japanese programmer" can be used as a negative textbook in "refactoring.