Article View: borland.public.csharpbuilder.language.csharp
Article #189Re: Converting from Delphi (sets and streams)
From: Francois PIETTE [ICS - MidWare]
Date: Sun, 29 Oct 2006 15:15
Date: Sun, 29 Oct 2006 15:15
18 lines
1760 bytes
1760 bytes
>> For enumerations, use an integer type and the bit wise operators.
>
> I know of that approach, but bitwise operations work with powers of 2, how
> would you do it with numbers like 9, 10, 13 and 32 - they have to be like
> that cause they're character codes ('\t', '\n', '\r', ' ') and using some
> constants would just reduce the speed of the program. Or am I wrong about
> this? How do Delphi sets work anyway (I mean internally, I know how to use
> them)?
For set of ordinal type, I think Delphi use the equivalent "case-of". Have a
look at the assembly code generated by Delphi.
--
francois.piette@overbyte.be
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
Technical Details
Message-ID:
<4544c59a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45448666@newsgroups.borland.com> <4544a026$2@newsgroups.borland.com> <4544b241@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,228682803dcaeb60 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Francois PIETTE [ICS - MidWare]" <francois.piette@overbyte.be> Newsgroups: borland.public.csharpbuilder.language.csharp References: <45448666@newsgroups.borland.com> <4544a026$2@newsgroups.borland.com> <4544b241@newsgroups.borland.com> Subject: Re: Converting from Delphi (sets and streams) Date: Sun, 29 Oct 2006 16:15:06 +0100 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 81.244.50.87 Message-ID: <4544c59a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1162134938 81.244.50.87 (29 Oct 2006 07:15:38 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail