delphi if a in[1,2,3,4,5] then b='c' else b='' 如果a等于1,2,3,4,5时b等于c,否则等于空 这个句子在delphi报表里面怎么写?
人气:386 ℃ 时间:2020-05-22 15:34:40
解答
有多种写法啊: 一、如果a定义为整型:a:Integer if (a>=1 ) and (a我这样写你看对吗a : Charbeginif a in ['1','2','3','4','5'] then b := 'c'elseb:=''end正确,不过要写对地方!vara : Char;b,c : string;beginf a in ['1','2','3','4','5'] then b := 'c'elseb:=''end;