Foxtable(狐表)用户栏目专家坐堂 → 选择框里面的<, > ,= ,<=, >=,值如何体现在代码中呢?


  共有2777人关注过本帖树形打印复制链接

主题:选择框里面的<, > ,= ,<=, >=,值如何体现在代码中呢?

帅哥哟,离线,有人找我吗?
有点蓝
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/24 9:45:00 [只看该作者]

先直接用,测试通过后再改为动态函数

If  tel1 > tel3 Then

tel2 就没有必要传入函数了

Dim Code As string
Code
 = "Dim e = args(0)" & vbcrlf
Code
 = Code & "Dim tel1 As String = args(1)" & vbcrlf
……
Code
 = Code & "If  tel1 " & tel2 & " tel3 Then" & vbcrlf
Code = Code & "If FileSys.FileExists(e) Then"
……
Functions.Add(
"Sum",Code)
Functions.Complie()

或者像9楼说的那样直接判断把

Dim e = args(0)
Dim tel1 As String = args(1)
Dim tel2 As String = args(2)
Dim tel3 As String = args(3)
Dim tel4 As String = args(4)
If (tel2 = "=" andalso  tel1 = tel3) orelse (tel2 = ">" andalso  tel1 > tel3) orelse ........  Then
    If FileSys.FileExists(e) Then
        MessageBox.Show("1")
        FileSys.CopyFile(e, tel4 & FileSys.Getname(e),True)
    End If
End If

 回到顶部
总数 11 上一页 1 2