本帖最后由 tsys 于 2012-1-14 19:53 编辑 #include <Math.au3>
_Create_Fields("mdb","pwd","tbn","type","key","int","123","abc","text")
Func _Create_Fields($mdb_data_path,$mdb_data_pwd,$tblname,$type_1='',$key1='',$type_2='',$key2='',$type_3='',$key3='',$type_4='',$key4='', _
$type_5='',$key5='',$type_6='',$key6='',$type_7='',$key7='',$type_8='',$key8='',$type_9='',$key9='',$type_10='',$key10='')
Local $Value
If (@NumParams-5)/2 <> 0 And _MathCheckDiv(@NumParams-5, 2) = 2 Then
For $i = 2 To @NumParams-5
$Value &= ','&Eval('type_' & $i) &','&Eval('key' & $i)
Next
MsgBox(0,"",$Value)
EndIf
EndFunc
以上代码运行结果如图:
请教如何将text 后面的2个逗号去掉,无论该函数有多少个参数,总是不希望最后一个值含有逗号。 |