Path: news.cs.au.dk!not-for-mail From: Elmer Sandvad Newsgroups: comp.lang.beta Subject: Re: Again a question about ^text [Incompatible types of binary operator] Date: 19 Nov 1999 13:55:19 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 48 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19991119135519.26852.qmail@noatun.mjolner.dk> Reply-To: Elmer Sandvad NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 943019735 9149916 255.255.255.255 (19 Nov 1999 13:55:35 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 19 Nov 1999 13:55:35 GMT Xref: news.cs.au.dk comp.lang.beta:12168 Hi, The current practice is to write: (if true // 'TEST'->t.equal then ... // 'TEST2'->t.equal then ... // 'TEST3'->t.equal then ... ... if); Best regards Elmer Sandvad "Sascha Kimmel (tricos Mediaservice)" wrote: > > Hi again, > > well, what about: > > ... > > t:^text; > do > (if t[] > //'TEST' then ... > //'TEST2' then ... > ... > if); > > ... > > Well, this won't work, because "(if t[]='TEST' then ... if)" won't work, > because I should use "(if 'TEST'->t.equal then ... if)". > But if you have many many comparisons of texts in your program a simple > > (if 'TEST'->t.equal then ... if); > (if 'TEST2'->t.equal then ... if); > (if 'TEST3'->t.equal then ... if); > ... > > doesn't look very well, so is there a possibility? > > Regards, > Sascha Kimmel >