Re: if x=y or z or .....
From: J French (erewhon_at_nowhere.uk)
Date: 12/30/04
- Next message: Shahram: "Re: Software protection"
- Previous message: J French: "Re: Stack Overload causes loss of code"
- In reply to: Mark Ashley: "Re: if x=y or z or ....."
- Next in thread: Metal Dave: "Re: if x=y or z or ....."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 10:23:23 +0000 (UTC)
On Thu, 30 Dec 2004 09:27:16 +0000 (UTC), "Mark Ashley" <priv@te.com>
wrote:
>Hi John
>
>I got your first example to compile but not the second one. Let me give you
>my real world example:
>
> if
>(piecetype='c1')or(piecetype='c4')or(piecetype='s1')or(piecetype='s3')
> or(piecetype='t1')or(piecetype='t3')or(piecetype='t4')
> then ottt:=true;
>
>compiles ok, and if piecetype is equal to c1,c4,s1,s3,t1,t3 or t4 then ottt
>is set to true.
>
> case piecetype of 'c1','c4','s1','s3','t1','t3','t4' begin
>ottt:=true;end;
>
>Does not compile - I get error "Ordinal type required".
>
>The case method looks a lot tidier and appears more "efficient" (maybe this
>is crap) so I would like to get it working - any further clues?
The Case method is, indeed, a much tidier way of coding
- well in my view anyway
The problem is that Case does not work with Strings
- Next message: Shahram: "Re: Software protection"
- Previous message: J French: "Re: Stack Overload causes loss of code"
- In reply to: Mark Ashley: "Re: if x=y or z or ....."
- Next in thread: Metal Dave: "Re: if x=y or z or ....."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|