确实只是一个习惯问题,呵呵,习惯就好!
随便拿一段吹版的代码做例子:
* ----------源程序--------------
FUNCTION load_data(filename)
IF !FILE(filename)
RETURN 0
ENDIF
LOCAL fp, ptr
fp = myFOpen(filename, "rb")
IF
fp == 0
RETURN 0
ENDIF
head = 0
last = 0
IF apiFRead(pBuffer,bufSize,1,fp) == 1
head = dt.create()
apiMemcpy_s(head, bufSize, pBuffer, bufSize)
dt.setValue("next", 0, head)
last = head
ENDIF
DO WHILE apiFRead(pBuffer,bufSize,1,fp) == 1
ptr = dt.create()
apiMemcpy_s(ptr, bufSize, pBuffer, bufSize)
dt.setValue("next", 0, ptr)
dt.setValue("next", ptr, last)
last = ptr
ENDDO
apiFClose(fp)
RETURN head
ENDFUNC
* ----------临时注释掉一段程序--------------
FUNCTION load_data(filename)
IF !FILE(filename)
RETURN 0
ENDIF
LOCAL fp, ptr
fp = myFOpen(filename, "rb")
IF
fp == 0
RETURN 0
ENDIF
head = 0
last = 0
IF apiFRead(pBuffer,bufSize,1,fp) == 1
head = dt.create()
apiMemcpy_s(head, bufSize, pBuffer, bufSize)
dt.setValue("next", 0, head)
last = head
ENDIF
#if .f. &&-------------暂时跳过以下循环-------------
DO WHILE apiFRead(pBuffer,bufSize,1,fp) == 1
ptr = dt.create()
apiMemcpy_s(ptr, bufSize, pBuffer, bufSize)
dt.setValue("next", 0, ptr)
dt.setValue("next", ptr, last)
last = ptr
ENDDO
#endif .f. &&-------------暂时跳过以上循环-------------
apiFClose(fp)
RETURN head
ENDFUNC
* ------------------------------------------------
* 若随时想要取消注释,只需将#if .f. 和#endif .f.这两行的行首#换成*即可
* 亲,不香吗?
* ------------------------------------------------