以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关于IF语句  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=76851)

--  作者:czy66ds
--  发布时间:2015/11/6 10:17:00
--  关于IF语句
在条件语句:If DP = "按品牌" And (user.Group = "管理" Or user.Type = UserTypeEnum.Developer) Then中, 
DP = "按品牌" And (user.Group = "管理" Or user.Type = UserTypeEnum.Developer) 将被多次使用,但是语句太长,其中DP是string变量,
请问能否用变量代替?

--  作者:大红袍
--  发布时间:2015/11/6 10:19:00
--  
不可以。
--  作者:Hyphen
--  发布时间:2015/11/6 10:21:00
--  

重用的代码,设计到全局函数中http://www.foxtable.com/help/topics/1486.htm