Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 20255, More accessebility to set elements

by Daniel Baulig Email: Anonymous


It should be possible to access each element in a set without needing to check each possible element for it's occurance
Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 7.0  to 7.0 7 downloads
Copyright: No significant restrictions


Size: 0 bytes
Updated on Sat, 23 Aug 2003 09:37:35 GMT
Originally uploaded on Sun, 29 Jun 2003 13:31:40 GMT
Description
if you want to access each element in a set, you'll need to do somethin like that:

var
SetOfInts: TIntSet;
Value: Integer;
begin
for Value := Low(Integer) to Hight(Integer) do
if Value in SetOfInts then
//DoSomething with Value
end;

thats neither nice nore is it very performant
something like the following would look much nicer and would give a lot more power to sets

var
SetOfInts: TIntSet;
Value: Integer;
begin
foreach Value in SetOfInts do
// Do Something with Value
end;
PS: I just found the construct as in php would suite the needs more: foreach SetOfInts as Value do
//Do something with Value

Server Response from: ETNACDC03