Re: question concerning evaluate.
- From: docdwarf@xxxxxxxxx
- Date: 25 Aug 2005 12:46:17 -0400
In article <11grnght6t0ntad@xxxxxxxxxxxxxxxxxx>,
Pat Hall <phall@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>A friend emailed me this question today:
>
>I think this is the case, but I want to confirm it. On the AS/400 when
>you have two consecutive WHEN clauses of a EVALUATE, like below, the
>first won't do anything and the second will do the code.
>
>Evaluate Color
>
>When 'Blue '
>When 'Green'
> Compute Z = X * Y
> Compute A = Z * Z
> Compute B = A - 25
>
>End Evaluate
>
>
>For some reason I thought there would be an implied "and" between the
>two when statements but I can find no basis for this assumption.
As I understand it there is an OR between the conditions, not an AND...
what you post would be equivalent to:
If Color = 'Blue ' or Color = 'Green'
Compute Z = X * Y
Compute A = Z * Z
Compute B = A - 25
End-If
.... assuming, of course, that the compiler does not have 'Color' as a
reserved word.
DD
.
- References:
- question concerning evaluate.
- From: Pat Hall
- question concerning evaluate.
- Prev by Date: Re: OT: Colour blindness [Was: Re: "Shared" procedure division code]
- Next by Date: Re: question concerning evaluate.
- Previous by thread: Re: question concerning evaluate.
- Next by thread: Re: question concerning evaluate.
- Index(es):
Relevant Pages
|