[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

what are the corresponding  statements.

Posted on 2000-01-31
2
Medium Priority
?
110 Views
Last Modified: 2010-07-27
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           ????  




0
Comment
Question by:ams4380361
2 Comments
 
LVL 6

Accepted Solution

by:
DrDelphi earned 200 total points
ID: 2466041
DoEvents= Application.ProcessMessages
IF statement:

   If <codition> then do
   begin
    <code>
    <code>
   end
   Else
    <code>
   end;
 
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2468562
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
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question