作业帮 > 英语 > 作业

delphi if a in[1,2,3,4,5] then b='c' else b=''

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/14 17:40:46
delphi if a in[1,2,3,4,5] then b='c' else b=''
如果a等于1,2,3,4,5时b等于c,否则等于空 这个句子在delphi报表里面怎么写?
有多种写法啊:
一、如果a定义为整型:a:Integer
if (a>=1 ) and (a
再问: 我这样写你看对吗 a : Char begin if a in ['1','2','3','4','5'] then b := 'c' else b:='' end
再答: 正确,不过要写对地方! var a : Char; b,c : string; begin f a in ['1','2','3','4','5'] then b := 'c' else b:='' end;