易截截图软件、单文件、免安装、纯绿色、仅160KB

delphi简单问题

IF THEN ELSE中多个条件怎么写,如:字符串S1,S2,S3,S4均要不为空。
怎么样把它写到IF中去?
请各位帮帮忙,谢谢!
if (S1<>'') and (S2<>'') and (S3<>'') and (S4<>'') then
begin
  //...
end else begin
  //...
end;

if (s1 <>'') and (s2 <>'') and (s3 <>'') then
begin

end;

if () and () and () then

if () or () or () then

jf

if (Trim(S1) <>'') and (Trim(S2) <>'') and (Trim(S3) <>'') and (Trim(S4) <>'') then 
begin 
  //... 
end else begin 
  //... 
end;

建议特殊情况特殊操作
if not Sametext(s1+s2+s3+s4, '') then begin

end;

或者
if s1+s2+s3+s4 <> '' then begin

end;

if (s1 = '') or (s2 = '') or (s3 = '') or (s4 = '') then
begin

end
eles
begin
  //均不为空执行体
end;

楼上几位的都挺好的,我接个分


相关问答:

Python中的Unicode在Delphi如何还原成Gb2312?

已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试

在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......

delphi動態調用dll的困惑

procedure RunFunction;  
  type  
  TFunc = function(A: Integer): Integer;stdcall; //这里根据DLL里面函数的声明修改  
  var  
  ......

Delphi中数据库查询的疑惑

昨晚在Delphi数据库查询中遇到了一个疑惑。代码如下:
procedure TFormSearchAchievement.ComboBoxXYChange(Sender: TObject);
var
  XY : string;
begin
  XY := comboboxxy.Items[comboboxx ......

VC++ 中的&符号 对应的是Delphi中的哪个符号??

VC++ 中, &变量名。 是什么意思。 Delphi中 和他一样的符号 是哪个、?

大家都认为,C语言之所以强大,以及其自由性,很大部分体现在其灵活的指针运用上。因此,说指针是C语言的灵魂,一点都不为过。同时, ......

Delphi怎么取返回内容中的指定部分.

返回的内容是如下代码,怎么能渠道2b?
<p class="text1">1a </p>
<p class="text1">2b </p>
<p class="text1">3c </p>
<p cl ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号