I am writing a program and stumbled when I tried to use "or" in an if statement
Here's what I've got:
[tt]
Procedure TfBankRes.BtnCloseClick(Sender: TObject);
Begin
if tbBank.State = dsInsert or dsEdit then
begin
do some stuff;
end;
End;
[/tt]
I wanted to perform the same set of commands for both data states without having to create two seperate IF statements. I'm sure this is pretty basic just that I've never done it before.
Can anyone help.
Aloha,
cg
Here's what I've got:
[tt]
Procedure TfBankRes.BtnCloseClick(Sender: TObject);
Begin
if tbBank.State = dsInsert or dsEdit then
begin
do some stuff;
end;
End;
[/tt]
I wanted to perform the same set of commands for both data states without having to create two seperate IF statements. I'm sure this is pretty basic just that I've never done it before.
Can anyone help.
Aloha,
cg