ABCDABCD",ch="B",则函数的返回值为:"ACDACD" Function delchar(str As String,ch As String)As String Dim k As Inlegcr,temp As String,ret As String ret="" For k=1 To Len(str) temp=Mid(str,k,1) If temp=ch Then ret=ret&temp End If Next k delchar=ret En d Function 但实际上函数有错误,需要修改,下面的修改方案中正确的是()。
A.把ret=ret&temp改为ret=temp
B.把If temp=ch Then改为If temp<>ch Then
C.把delchar=ret改为delchar=temp
D.把ret=""改为temp=""