Re: question concerning evaluate.



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

.



Relevant Pages

  • Re: Free FAT16 Filesystem
    ... being an honourable reason. ... Dave, I made every effort 3 weeks ago to have you understand that if you ... >>Murray did not mention Keil in his correspondence to you. ... >>both your compiler AND under Keil's, ...
    (comp.arch.embedded)
  • compiler and metadata, request opinions...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.compilers)
  • misc: compiler and metadata...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.lang.misc)
  • Re: "Sorting" assignment
    ... issue on some ancient compiler doesn't make a lot of sense. ... to his on a few commonly used platforms and compilers, ...  Be sure and call the swap ... reason to find algorithms which operate independent of it. ...
    (comp.programming)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... >convention that has served Fortran for 50 years, is itself, no good ... >reason for change. ... >done, using implicit typing. ... The IBM 1130 compiler could do ...
    (comp.lang.fortran)