home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ysu.edu!psuvm!frmop11!barilvm!bimacs!ehrlich
- From: ehrlich@bimacs.BITNET (Gideon Ehrlich)
- Newsgroups: comp.lang.pascal
- Subject: Re: Set question
- Message-ID: <4108@bimacs.BITNET>
- Date: 12 Aug 92 12:01:03 GMT
- References: <19621@plains.NoDak.edu>
- Organization: Math department, Bar-Ilan University, Ramat-Gan, ISRAEL
- Lines: 39
-
- In article <19621@plains.NoDak.edu> jorgense@plains.NoDak.edu (Lee A.
- Jorgensen) writes:
-
- >Ok, I might be missing something here, but how do I remove a member of a
- >set?
- >
- >I tried two ways:
- >
- >TYPE ValidChar = set of '0' .. 'z';
- >VAR ValidC : ValidChar;
- > a : Char;
- >Begin
- > ValidC:=['0','1','2' .... 'x','y','z'];
- > ^^^^^ --------------This does have ALL
- > characters in here
- > a:=chr(49);
- > ValidC:=ValidC-a;
-
- ILLEGAL !!! you should write : ValidC:=ValidC- [a];
- ^ ^
- >--- and ---
- > NewSetC:=ValidC-a;
- ^
- ^
-
- >where NewSetC is of type ValidChar.
- >
- >What's am I doing wrong? The manual isn't too explicit on sets.
- >
- >Thanks ... Lee.
-
- You mixed types. a is an element, [ a ] is a set.
- The - is defined among sets.
- >
-
- SHALOM Gideon Ehrlich ERETZ YISRAEL
-
-
-
-