AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

In Set or Not in Set? Frage zu Set.

Ein Thema von Go2EITS · begonnen am 6. Okt 2006 · letzter Beitrag vom 6. Okt 2006
Antwort Antwort
Seite 3 von 3     123   
Go2EITS

Registriert seit: 25. Jun 2006
519 Beiträge
 
Delphi 7 Personal
 
#21

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 14:07
@hagen
Vielen Dank für das freundliche Angebot.
Ich sehe nochmal unter D7 und TD2006 nach.
Aber mein Problem mit not ist soweit gelöst, da habe ich schon ewig getüftelt.

Beste Grüße
Go2EITS
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#22

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 14:31
Ähm dumme Frage, hatte ich oben Recht mit der Mengenmultiplikation?
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
Go2EITS

Registriert seit: 25. Jun 2006
519 Beiträge
 
Delphi 7 Personal
 
#23

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 14:40
Schulterzucken-Smilie
  Mit Zitat antworten Zitat
Klaus01
Online

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#24

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 14:44
Code:
The following operators take sets as operands.

Operator   Operation   Operand types   Result type   Example
+   union   set   set   Set1 + Set2
–   difference   set   set   S - T
*   intersection   set   set   S * T
<=   subset   set   Boolean   Q <= MySet
>=   superset   set   Boolean   S1 >= S2
=   equality   set   Boolean   S2 = MySet
<>   inequality   set   Boolean   MySet <> S1
in   membership   ordinal, set   Boolean   A in Set1

The following rules apply to +, –, and *.

An ordinal O is in X + Y if and only if O is in X or Y (or both). O is in X – Y if and only if O is in X but not in Y. O is in X * Y if and only if O is in both X and Y.
   The result of a +, –, or * operation is of the type set of A..B, where A is the smallest ordinal value in the result set and B is the largest.

The following rules apply to <=, >=, =, <>, and in.

X <= Y is True just in case every member of X is a member of Y; Z >= W is equivalent to W <= Z. U = V is True just in case U and V contain exactly the same members; otherwise, U <> V is True.
   For an ordinal O and a set S, O in S is True just in case O is a member of S.
wobei Intersection = Schnittmenge ist.

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
Go2EITS

Registriert seit: 25. Jun 2006
519 Beiträge
 
Delphi 7 Personal
 
#25

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 14:56
Delphi-Quellcode:
TYPE
  TIntSet = set of char;
VAR
Set1,set2,set3:TIntSet;
begin
Set1:=[#1..#128];
set2:=[#228,#246];
set3:=set1*set2;
Das funktioniert nun schon, auch wenn wir von der Frage, die ja eigentlich beantwortet ist, seit Hagen abschweifen. Und nun, was ist in set3 drin? Wie kann ich es anzeigen?
  Mit Zitat antworten Zitat
Klaus01
Online

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#26

Re: In Set or Not in Set? Frage zu Set.

  Alt 6. Okt 2006, 15:11
Soweit ich das überblicke, kannst Du nir auf leere oder nicht leere Menge Prüfen
und direkt abfragen ob ein Element in dem Set vorhanden ist.
if .. in ..

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 3 von 3     123   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:32 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz