Hi Ross,
 
You need to time it.
 
I don't know how you implement Option.ItemIndex.
 
If you think both are slow, you may introduce a temp i.e.
 
bEnabled := Option.ItemIndex = 1;
Label1.Enabled := bEnabled;
Label2.Enabled := bEnabled;
 
By the way, I don't think this speed improvement should attract your attention.
 
Regards
Leigh
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Ross Levis
Sent: Thursday, October 30, 2003 9:24 PM
To: Multiple recipients of list delphi
Subject: [DUG]: Just wondering...

Which of the following code is the most efficient/fastest to execute?
 
Label1.Enabled := Option.ItemIndex = 1;
Label2.Enabled := Option.ItemIndex = 1;
 
or

Label1.Enabled := Option.ItemIndex = 1;
Label2.Enabled := Label1.Enabled;
 
Thanks,
Ross Levis.

Reply via email to