Autor Beitrag
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 05.05.05 11:31 
Hi!

Folgende Frage: wie kann ich mit dem in-Operator feststellen, ob mehrere Elemente in einer Menge vorhanden sind, also ich habe z.B. eine Menge set of 1..31 und möchte wissen, ob die Elemente 2..15 darin enthalten sind.

AXMD
iX0r
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 34

Ubuntu
D6, Lazarus
BeitragVerfasst: Do 05.05.05 11:33 
afair:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
x set of [1..31]

...

if y in x then ...
// y muss natürlich "reinpassen" vom typ"