Link to home
Start Free TrialLog in
Avatar of ams4380361
ams4380361

asked on

what are the corresponding statements.

i can program using VB, but in my new career, i have to learn Delphi,i wonder what is the corresonding statments to

    VB                   Delphi
______________________________________
1-Doevents procedure     ????
2-IIF statment           ????  




ASKER CERTIFIED SOLUTION
Avatar of DrDelphi
DrDelphi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kretzschmar
hi ams4380361,

first
nothing to append to drdelphi

second
>but in my new career, i have to learn Delphi
what is your new career ?

on the other hand
you can code the iif function byself like


function iif(condition : Boolean; IfResult, ElseResult : Variant) : Variant;
begin
  if Condition then
    Result := IfResult
  else
    Result := ElseResult;
end;

//usage sample
procedure TForm1.Button1Click(Sender: TObject);
var
  a,b : Integer;
  s1,s2 : String;
begin
  a := 1;
  b := 2;
  showmessage(iif(a<b,'a < b','a >= b'));
  s1 := 'abc';
  s2 := 'xyz';
  showmessage(iif(s1=s2,'strings are equal','strings are not equal'));

end;


meikl