编程要讲效率,尽管现在的计算机,速度是不成问题,但是,如果一行代码能完成,为什么要用更多的代码呢?现在介绍vb中一些可用一行代码完成的技巧。
1、下列代码,则是对逻辑运算不清楚造成
if a=true then
c= not b
else
c= b
end if
c=a xor b
if c=true then
d=28
else
d=29
end if
d=iif((a xor b),28,29)
if a= 13 then
b=true
else
b=false
end if
b = a = 13
b = (a = 13)
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器