Steve,

I am pretty sure you are correct. This happened when they scrapped the pascal compiler and changed the c compiler to do pascal. One of the changes then was that you could not use the same selector value twice in the case statement. Before that time, you could.

Rohit

On 8/06/2016 17:27, Steve Peacocke wrote:
If I remember correctly, the compiler changes both to array anyway so you come out with exactly the same compiled code.

Perhaps someone can confirm this or tell me how wrong I am?

Steve Peacocke
+64 220 612-611


On 8/06/2016, at 4:56 PM, Ross Levis <[email protected] <mailto:[email protected]>> wrote:

I’m wondering which is more efficient to process...

if (a=1) or (a=2) then ...

or

if a in [1,2] then ...

If the answer is the first method, does it make a difference if more numbers are checked, eg. if a in [1..3,5] then

Cheers.

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected] <mailto:[email protected]>
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] <mailto:[email protected]> with Subject: unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe


--

Regards

*Rohit Gupta*
B.E. Elec., M.E., Mem IEEE, Mem IET
Technical Director
Computer Fanatics Ltd

*Tel *4892280
*Fax *4892290
*Web *www.cfl.co.nz

------------------------------------------------------------------------
This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to