Path: news.cs.au.dk!not-for-mail From: nospam2159@cs.au.dk (Peter von der Ahé) Newsgroups: comp.lang.beta Subject: Re: Cannot copy NONE? Date: 15 Nov 1999 16:32:40 +0100 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 14 Message-ID: References: <19991111233439.401.qmail@noatun.mjolner.dk> NNTP-Posting-Host: ufleku.cs.au.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: xinwen.cs.au.dk 942679960 9346165 255.255.255.255 (15 Nov 1999 15:32:40 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 15 Nov 1999 15:32:40 GMT X-Attribution: Ahe User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.4 Xref: news.cs.au.dk comp.lang.beta:12164 You could do this: (if t[] = NONE then &text[] -> t[] if); t.copy -> u[]; Then al the code which handles the "strange" case is encapsulated in the if imperative and easily ignored by anyone who tries to understand your code. This approach is wrong if it is important to distinguish between the cases (t.empty) and (t[] = NONE). But you cannot get it all :-) Cheers, Peter